mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-01 00:05:06 +01:00
fix check for null terminator
This commit is contained in:
parent
3375e8fc58
commit
d468306a18
2
Makefile
2
Makefile
@ -6,7 +6,7 @@ export TOPDIR := $(CURDIR)
|
||||
|
||||
export LIBFAT_MAJOR := 1
|
||||
export LIBFAT_MINOR := 0
|
||||
export LIBFAT_PATCH := 12
|
||||
export LIBFAT_PATCH := 13
|
||||
|
||||
export VERSTRING := $(LIBFAT_MAJOR).$(LIBFAT_MINOR).$(LIBFAT_PATCH)
|
||||
|
||||
|
@ -125,7 +125,7 @@ static size_t _FAT_directory_mbstoucs2 (ucs2_t* dst, const char* src, size_t len
|
||||
int bytes;
|
||||
size_t count = 0;
|
||||
|
||||
while (count < len-1 && src != '\0') {
|
||||
while (count < len-1 && *src != '\0') {
|
||||
bytes = mbrtowc (&tempChar, src, MB_CUR_MAX, &ps);
|
||||
if (bytes > 0) {
|
||||
*dst = (ucs2_t)tempChar;
|
||||
|
Loading…
Reference in New Issue
Block a user