1
0
Fork 0

DBG: remove leading whitespace when loading script to correctly handle tabs

This commit is contained in:
Duncan Ogilvie 2019-11-12 23:55:56 +01:00
parent fae8434284
commit b23c0dfe37
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 3 additions and 3 deletions

View File

@ -97,7 +97,7 @@ static bool scriptcreatelinemap(const char* filename)
{
memset(&entry, 0, sizeof(entry));
int add = 0;
while(temp[add] == ' ')
while(isspace(temp[add]))
add++;
strcpy_s(entry.raw, temp + add);
*temp = 0;
@ -109,7 +109,7 @@ static bool scriptcreatelinemap(const char* filename)
{
memset(&entry, 0, sizeof(entry));
int add = 0;
while(temp[add] == ' ')
while(isspace(temp[add]))
add++;
strcpy_s(entry.raw, temp + add);
*temp = 0;
@ -120,7 +120,7 @@ static bool scriptcreatelinemap(const char* filename)
{
memset(&entry, 0, sizeof(entry));
int add = 0;
while(temp[add] == ' ')
while(isspace(temp[add]))
add++;
strcpy_s(entry.raw, temp + add);
*temp = 0;