Jump to content

l4d2 forgot to sign its shorts


crasx

Recommended Posts

J4JJGqE.png

 

in binary this is 011111111100111. The first 0 in a signed number means positive (1 is negative)

now the actual score was -25 or 11111111 11100111, so I *think* when you convert signed to unsigned it drops that last bit? I haven't done this stuff in a while.... but yea, magic.

Link to comment
Share on other sites

 

 

in binary this is 011111111100111. The first 0 in a signed number means positive (1 is negative)

now the actual score was -25 or 11111111 11100111, so I *think* when you convert signed to unsigned it drops that last bit? I haven't done this stuff in a while.... but yea, magic.

 

Always knew you were some kind of wizard Crasx.

Link to comment
Share on other sites

Actually it was all because of an AFK on the safe, we made a few feets but we had to come back for the afk once he moved but it was too late, the other team was all over us so the afk died and with him those who came back.
I defibed two guys, so it would be -50 but we managed to travel enough for 25 points :P

Link to comment
Share on other sites

They are probably using an unsigned 2 byte number, thats why your neg 25 translates to a buffer over flow.

 

Numbers are generally represented as twos-complement, its weird so wikipedia'ing it will help you solve this.

Edited by diamon80
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...