because uni_str is incremented in utf8_to_u_hostendian() UNICODE is moved inside the loop in _utf8_to_sjis_bendian() to avoid crashing. (it points to a single unicode char!!) (other option is to not increment uni_str, but it's kept for consistency).
some cosmetic changes git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10575 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1054,13 +1054,13 @@ _utf8_to_sjis_bendian(
|
||||
int32 dstLimit = *dstLen;
|
||||
int32 srcCount = 0;
|
||||
int32 dstCount = 0;
|
||||
uint16 unicode;
|
||||
uint16 *UNICODE = &unicode;
|
||||
|
||||
while ((srcCount < srcLimit) && (dstCount < dstLimit)) {
|
||||
if ((srcCount + utf8_char_len(src[srcCount])) > srcLimit)
|
||||
break;
|
||||
|
||||
uint16 unicode;
|
||||
uint16 *UNICODE = &unicode;
|
||||
int err_flag;
|
||||
bool multibyte = false;
|
||||
const uint16 *table = NULL;
|
||||
|
||||
@@ -1209,6 +1209,7 @@ int dosfs_rename(void *_vol, void *_odir, const char *oldname,
|
||||
#endif
|
||||
|
||||
notify_listener(B_ENTRY_MOVED, vol->id, odir->vnid, ndir->vnid, file->vnid, newname);
|
||||
|
||||
// update MIME information
|
||||
if(!(file->mode & FAT_SUBDIR)) {
|
||||
set_mime_type(file, newname);
|
||||
|
||||
Reference in New Issue
Block a user