regedit: Prevent out-of-bounds reads when unescaping a string (Valgrind).