Fixed a bug that would incorrectly truncate immediate values

As discussed here: http://www.esp8266.com/viewtopic.php?f=13&t=214
Merge pull request #1 from 0ff/patch-1

Fixed a bug that would incorrectly truncate immediate values