Fix fpcrtl_strappendA, which cut last char from UserPathPrefix
authorunc0rr
Mon, 18 Apr 2016 21:47:39 +0300
changeset 11652 09ebdfe364d9
parent 11651 e5c101a6fb8d
child 11653 ef625fe6eaaa
Fix fpcrtl_strappendA, which cut last char from UserPathPrefix leading to PHYSFS_setWriteDir fail with 'File not found' error, which led to lack of writing dir and logFile handle being nil, which led to crash on attempt to write to (absent) log file
project_files/hwc/rtl/misc.c
--- a/project_files/hwc/rtl/misc.c	Wed Apr 13 20:02:14 2016 -0400
+++ b/project_files/hwc/rtl/misc.c	Mon Apr 18 21:47:39 2016 +0300
@@ -78,8 +78,8 @@
 {
     if(s.len < MAX_ANSISTRING_LENGTH)
     {
+        ++s.len;
         s.s[s.len] = c;
-        ++s.len;
     }
 
     return s;