Fix logic error in memory access

Signed-off-by: Brian McGillion <brian.mcgillion@intel.com>
Merge pull request #12 from Open-TEE/logic

Fix logic error in memory access