Core: Fix undefined behavior in mem_map_funcs' WriteBlock function

This would have been undefined behavior since offset was being used in a calculation (`addr + offset`) and being incremented before a sequence point (the terminating semi-colon).