[v0.88][ARM][BUGFIX] Fix bugs in single CPU SoCs and small bugs related to strings

This commit is contained in:
Dr-Noob
2020-11-24 10:27:33 +01:00
parent 71d660d7b1
commit 685e78f2b7
4 changed files with 6 additions and 7 deletions

View File

@@ -129,6 +129,7 @@ int get_ncores_from_cpuinfo() {
char* tmp1 = strstr(buf, "-") + 1;
char* tmp2 = strstr(buf, "\n");
char ncores_str[offset];
memset(ncores_str, 0, sizeof(char) * offset);
memcpy(ncores_str, tmp1, tmp2-tmp1);
char* end;