Created
July 30, 2014 16:28
-
-
Save Cee/822ecb72b74a73eaf067 to your computer and use it in GitHub Desktop.
Getbuf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned long long getbuf() { | |
char buf[36]; | |
volatile char* variable_length; | |
int i; | |
unsigned long long val = (unsigned long long)Gets(buf); | |
variable_length = alloca((val % 40) < 36 ? 36 : val % 40); | |
for(i = 0; i < 36; i++) { | |
variable_length[i] = buf[i]; | |
} | |
return val % 40; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment