Fixes bug #40

The length of the memory being decoded couldn’t be calculated with the
strlen() function.
Merge branch 'bug40'