[PATCH v2 1/1] reg: Fix out-of-bound read when string is empty.