Small fix which makes pas2c engine successfully replay demos
authorunc0rr
Tue, 11 Feb 2014 22:05:03 +0400
changeset 10130 a9d509848390
parent 10129 cd2a64a1f4aa
child 10131 4b4a043111f4
Small fix which makes pas2c engine successfully replay demos
hedgewars/uStore.pas
project_files/hwc/rtl/misc.c
--- a/hedgewars/uStore.pas	Tue Feb 11 01:19:44 2014 +0400
+++ b/hedgewars/uStore.pas	Tue Feb 11 22:05:03 2014 +0400
@@ -709,6 +709,9 @@
     else
         AddFileLog('OpenGL - "' + extension + '" failed to load');
 {$ENDIF}
+
+{$ELSE} // pas2c part
+    glLoadExtension:= false;
 {$ENDIF}
 end;
 
--- a/project_files/hwc/rtl/misc.c	Tue Feb 11 01:19:44 2014 +0400
+++ b/project_files/hwc/rtl/misc.c	Tue Feb 11 22:05:03 2014 +0400
@@ -205,7 +205,7 @@
     if(s->len == MAX_ANSISTRING_LENGTH)
         --s->len;
 
-    s->s[s->len] = 0;
+    s->s[s->len + 1] = 0;
     return &s->s[1];
 }