Code/Framework fixes

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
pappeste
2021-06-24 19:05:30 -07:00
committed by Esteban Papp
parent e648dbcf08
commit 81d26d322d
11 changed files with 26 additions and 24 deletions
+6 -5
View File
@@ -14,6 +14,7 @@
#include <AzCore/std/chrono/chrono.h>
#include <AzCore/std/string/conversions.h>
#include <AzCore/Utils/Utils.h>
#include <AzCore/Casting/lossy_cast.h>
#include <stdio.h>
#include <stdlib.h>
#include <io.h>
@@ -284,7 +285,7 @@ char* CRCfix::GetToken(FILE* infile, FILE* outfile)
{
if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '#' || c == '_')
{
token[i++] = c;
token[i++] = azlossy_cast<char>(c);
continue;
}
else
@@ -375,7 +376,7 @@ void CRCfix::GetPreviousCRC(char* token, FILE* infile)
int c;
while ((c = fgetc(infile)) != ')')
{
*token++ = c;
*token++ = azlossy_cast<char>(c);
}
*token = 0;
}
@@ -426,7 +427,7 @@ int CRCfix::Fix(Filename srce)
if (strcmp(token, "AZ_CRC") == 0 && lastchar == '(')
{
size_t i = strlen(token);
token[i++] = lastchar;
token[i++] = azlossy_cast<char>(lastchar);
int c = fgetc(infile);
if (c == '"')
@@ -435,11 +436,11 @@ int CRCfix::Fix(Filename srce)
do
{
token[i++] = c;
token[i++] = azlossy_cast<char>(c);
c = fgetc(infile);
} while (c != '"');
token[i++] = c;
token[i++] = azlossy_cast<char>(c);
c = fgetc(infile);
int oldcrc = 0, newcrc;