Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
60 user(s) are online (39 user(s) are browsing Forums)

Members: 1
Guests: 59

Nuder_Try, more...

Support us!

Headlines

Report message:*
 

Re: MineCraft (MineTest) work in progress help need it

Subject: Re: MineCraft (MineTest) work in progress help need it
by kas1e on 2021/1/9 11:27:55

@salas00

Sorry was a bit dumb, and this "caught unhandled exception: deSerializeString: couldn't read all chars" were caused by the fact that i do that:

printf("test !! : %sn",deSerializeString(is).c_str());

    
UASSERT(strcmp(deSerializeString(is).c_str(), "foobar!") == 0);


So seems the first printf already did what it should do with "is", and then all next tests with deSerializeString fail. But if I remove that printf, then your version passed fine.

@billyfish

tried your example with cout, and it says that says of "foobar!" is 7 bytes. So that as expected, but still pure UASSERT(deSerializeString(is) == "foobar!"); fail, why ?:)

And tested your:

Quote:

std::string str = "foobar!";
std::string temp ("foobar!");
if (str.compare (temp))
{
std::cout << "matched\n";
}


That one didn't match! Seems to fail too? I haven't this printf. Wtf it means?:)

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project