1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-11-22 20:06:43 +00:00

Empty strings should be valid

This commit is contained in:
Such Meme, Many Skill 2020-05-17 01:04:33 +02:00
parent a872b90597
commit f61fcfea32
2 changed files with 3 additions and 3 deletions

View file

@ -194,8 +194,8 @@ char *utils_InputText(char *start, int maxLen){
return buff; return buff;
} }
char *utils_copyStringSize(const char *in, u32 size){ char *utils_copyStringSize(const char *in, int size){
if (size > strlen(in) || size == 0) if (size > strlen(in) || size < 0)
size = strlen(in); size = strlen(in);
char *out = calloc(size + 1, 1); char *out = calloc(size + 1, 1);

View file

@ -24,4 +24,4 @@ int utils_mmcMenu();
void utils_copystring(const char *in, char **out); void utils_copystring(const char *in, char **out);
char *utils_InputText(char *start, int maxLen); char *utils_InputText(char *start, int maxLen);
void utils_takeScreenshot(); void utils_takeScreenshot();
char *utils_copyStringSize(const char *in, u32 size); char *utils_copyStringSize(const char *in, int size);