From 409453a6a1ea693dac7a0e487beb55577ad10869 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Tue, 7 Apr 2020 14:03:15 +0100 Subject: [PATCH] Note some null characters --- src/TextScr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TextScr.cpp b/src/TextScr.cpp index 52054005..da205c35 100644 --- a/src/TextScr.cpp +++ b/src/TextScr.cpp @@ -139,7 +139,7 @@ BOOL LoadTextScript2(const char *name) // Read data. Note that gTS.size may exceed the size of 'gTS.data' (TSC_BUFFER_SIZE) fread(gTS.data, 1, gTS.size, fp); - gTS.data[gTS.size] = 0; + gTS.data[gTS.size] = '\0'; fclose(fp); // Set path @@ -173,7 +173,7 @@ BOOL LoadTextScript_Stage(const char *name) // Read Head.tsc. Note that head_size may exceed the size of 'gTS.data' (TSC_BUFFER_SIZE) fread(gTS.data, 1, head_size, fp); EncryptionBinaryData2((unsigned char*)gTS.data, head_size); - gTS.data[head_size] = 0; + gTS.data[head_size] = '\0'; fclose(fp); // Open stage's .tsc @@ -190,7 +190,7 @@ BOOL LoadTextScript_Stage(const char *name) // Read stage's tsc. Note that head_size + body_size may exceed the size of 'gTS.data' (TSC_BUFFER_SIZE) fread(&gTS.data[head_size], 1, body_size, fp); EncryptionBinaryData2((unsigned char*)&gTS.data[head_size], body_size); - gTS.data[head_size + body_size] = 0; + gTS.data[head_size + body_size] = '\0'; fclose(fp); // Set parameters