Impossible Bug
#2

The only thing that doesn't fit with your code is that because the loop ends at 9
Quote:
Originally Posted by Sanady
Посмотреть сообщение
Код:
[00:34:33] [DEBUG]{C0C0C0}tmpPassStr[10] = ']]]]]]]]]]]wewewewewewe'
The case is easy, each string needs to end with a EOS (0) character
You overwrite the last cell and therefore it shows data beyond you array till it finds a 0

Since you created string before you will see the value of the "RegisterPassword"

Also if you want to create a plain array with only one sign you could do it like that
pawn Код:
new
    tmpPassStr2[11] = { ']', ... }
;
if(strlen(inputtext) < sizeof tmpPassStr2) {
    tmpPassStr2[strlen(inputtext)] = EOS;
} else {
    tmpPassStr2[sizeof tmpPassStr2 - 1] = EOS;
}
Reply


Messages In This Thread
Impossible Bug - by Sanady - 21.12.2013, 22:36
AW: Impossible Bug - by Nero_3D - 21.12.2013, 23:06

Forum Jump:


Users browsing this thread: 1 Guest(s)