Fix string index oob in octal escapes

Check for the end of string
fixes glib gscanner.h's G_CSET_LATINS and G_CSET_LATINC

https://github.com/codeanticode/gstreamer-1.x-java/issues/1
Merge pull request #473 from enzymepower/patch-1

Fix string index oob in octal escapes