←back to thread

600 points codetrotter | 1 comments | | HN request time: 0.391s | source
Show context
dang ◴[] No.35462970[source]
I periodically cut the karma total on my account. Now I think I should set it to -1.

  (when (is (karma "dang") 65535)
    (add-karma "dang" -65536))
Edit (after skimming the thread): here I was thinking my joke was original...I forgot who I was dealing with here.
replies(3): >>35462984 #>>35463008 #>>35499916 #
ncr100 ◴[] No.35462984[source]
I was going to suggest that perhaps it was already rolling over.

Maybe do a signed short, just for you instead?

replies(1): >>35463589 #
1. eru ◴[] No.35463589[source]
Just make sure you don't use C anywhere in the stack, because overflowing signed integers is undefined behaviour.