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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...