- fixed uninitialized string offset by adding check on empty string