Force All strings to be a multiple of 4 bytes in length, pad with Zeros

This commit is contained in:
Jeremiah Orians 2016-08-21 15:10:15 -04:00
parent a4fad62ffb
commit c500eea1f5
No known key found for this signature in database
GPG Key ID: 7457821534D2ACCD
1 changed files with 8 additions and 1 deletions

View File

@ -456,7 +456,14 @@ void update_jumps(struct Token* head, struct Token* p)
void hexify_string(char* s, char* d, int max)
{
char table[16] = {0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46};
int i = 0;
int i = ((strnlen(s, max)/4) + 1) * 8;
while(0 < i)
{
i = i - 1;
d[i] = 0x30;
}
while( i < max)
{
if(0 == s[i])