fix a substring bug.

Change-Id: I1f395e4f9cd8763134e2c525189fec794715fa58
Signed-off-by: Sharl <amoiz.shine@gmail.com>