]> Chaos Git - corbenik/ctrulib.git/commitdiff
Fix PATH_UTF16 size miscalculation, yet again
authorfincs <fincs.alt1@gmail.com>
Sun, 15 Nov 2015 18:21:00 +0000 (19:21 +0100)
committerfincs <fincs.alt1@gmail.com>
Sun, 15 Nov 2015 18:21:00 +0000 (19:21 +0100)
libctru/source/services/fs.c

index 8e18cbc547fb69d955a716b3626adc209f26e2fb..9ee0eb3a0df97d90de3e8233ce7e484f41868b01 100644 (file)
@@ -48,7 +48,7 @@ FS_Path fsMakePath(FS_PathType type, const void* path)
                {
                        const u16* str = (const u16*)path;
                        while (*str++) p.size++;
-                       p.size++;
+                       p.size = (p.size+1)*2;
                        break;
                }
                case PATH_EMPTY: