thread: Code!
View Single Post
  #2  
01-17-2014, 11:48 PM
Varrok's Avatar
Varrok
Wolvark Grenadier
 
: Jun 2009
: Beartopia
: 7,301
Blog Entries: 52
Rep Power: 26
Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)

:
This freaked me out at first, but from the look of the dissasembly it appears that the second printf() gets shuffled down to after the allocation. Is it possible that could be significant?
I don't think so.

What type of variable is "pixels"? (Was the struct defined by you or came with SDL or sth?). Can it FIT such numbers as "0xFF00FFFF" ( 4278255615 in decimal, much more than this 70m you got in the output) there? Also, shouldn't the second printf() be put after allocation anyway? what's the point of showing the unchanged value?
Reply With Quote