mirror of
https://github.com/joel16/VitaShell.git
synced 2024-11-26 21:30:45 +00:00
Fix (void*) maths.
Doing void* pointer math is undefined behaviour.
This commit is contained in:
parent
1e807ad91d
commit
d240984c07
@ -27,7 +27,7 @@ static char* getStringFromRegmatch(char* source,size_t so,size_t eo)
|
||||
word[0] = '\0';
|
||||
}else{
|
||||
word = malloc(sizeof(char) * (wordlength + 1));
|
||||
memcpy((void*)word,(void*)source + so,wordlength);//copy string
|
||||
memcpy((void*)word,(void*)(source + so),wordlength);//copy string
|
||||
word[sizeof(char) * (wordlength)] = '\0';
|
||||
}
|
||||
return word;
|
||||
|
Loading…
Reference in New Issue
Block a user