Added the last missing bits of functionality, and fixed a nasty bug where we
could overwrite memory.
2 files changed