title: Adding Base Address + Offsets to Modify Value
body: <p>I'm trying to modify a value for Solitaire such as the score.</p>
  
  <p>Anyways I found the addresses (using CheatEngine) that the pointers point to but I'm having difficult injecting code to modify the score.  I'm almost certain it's the way I'm adding the offsets to the base value and not Windows DEP, my injecting method, or anything else.</p>
  
  <p>Here's the code I'm using.</p>
  
  <pre><code>#define BASE    0xFFAEAFA8
  #define fOFFSET 0x50
  #define sOFFSET 0x14
  #define VALUE   55555
  
  
  *(int*)(((*(int*) BASE) + fOFFSET) + sOFFSET) = VALUE;
  </code></pre>
  
  <p>Whenever I inject this code my game crashes.  Works fine if I modify the values in Cheat Engine but not in code.</p>