Off by one error in own recent commit
authorCampbell Barton <ideasman42@gmail.com>
Thu, 8 Oct 2015 08:04:33 +0000 (19:04 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 8 Oct 2015 08:05:16 +0000 (19:05 +1100)
source/blender/blenlib/intern/storage.c

index 04d5e35355a21a771b8f9c9fa378020403b3cf25..f7a8664c7399fe13fff099483dcd84f704b8b34f 100644 (file)
@@ -93,7 +93,7 @@ char *BLI_current_working_dir(char *dir, const size_t maxncpy)
        if (pwd) {
                size_t srclen = BLI_strnlen(pwd, maxncpy);
                if (srclen != maxncpy) {
-                       memcpy(dir, pwd, srclen);
+                       memcpy(dir, pwd, srclen + 1);
                        return dir;
                }
                else {