fixed byte format overflowing
yippee
This commit is contained in:
parent
9734749c3e
commit
0abd38e877
@ -81,13 +81,7 @@ why2_output_flags why2_decrypt_text(char *text, char *key_new)
|
|||||||
for (unsigned short j = 2 + (i * 2); j <= 3 + (i * 2); j++)
|
for (unsigned short j = 2 + (i * 2); j <= 3 + (i * 2); j++)
|
||||||
{
|
{
|
||||||
//ENSURE THERE IS NO \0 (REVERSED)
|
//ENSURE THERE IS NO \0 (REVERSED)
|
||||||
if (text_copy[j] > 0)
|
if (text_copy[j] == -128) text_copy[j] = 0;
|
||||||
{
|
|
||||||
text_copy[j]--;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
text_copy[j]++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//PUT TOGETHER
|
//PUT TOGETHER
|
||||||
|
@ -132,13 +132,7 @@ why2_output_flags why2_encrypt_text(char *text, char *key_new)
|
|||||||
for (unsigned long j = 2 + (i * 2); j <= 3 + (i * 2); j++)
|
for (unsigned long j = 2 + (i * 2); j <= 3 + (i * 2); j++)
|
||||||
{
|
{
|
||||||
//ENSURE THERE IS NO \0
|
//ENSURE THERE IS NO \0
|
||||||
if (returning_text[j] > 0)
|
if (returning_text[j] == 0) returning_text[j] = -128;
|
||||||
{
|
|
||||||
returning_text[j]++;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
returning_text[j]--;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user