I have this statement:
return *local_stack_var2++ + 42;
Will these be the right steps to destroy it:
1. Splitting local_stack_var2
2. Add 42 to the dereferenced local_stack_var2 (the function will actually return this value)
3. Before the function finishes, it activates the post-increment, increasing the value of the object pointed to by local_stack_var2
So something like this would look like in code format?
int temp = *local_stack_var2
int returnValue = temp + 42;
*local_stack_var2 = *local_stack_var2 + 1;
return returnValue;
Thank!
source
share