preproc.c: Make %substr robust
commitbf11db6acaa340e0c8ec39eb27f0f925b45a41e9
authorCyrill Gorcunov <gorcunov@gmail.com>
Tue, 7 Sep 2010 16:31:11 +0000 (7 20:31 +0400)
committerCyrill Gorcunov <gorcunov@gmail.com>
Tue, 7 Sep 2010 16:55:03 +0000 (7 20:55 +0400)
treeea858462ebf06cffe7b4be9d13964d285b26f2e2
parent8fccbf33dbbc8b94d1907745f0e5bfd8f9f1bb01
preproc.c: Make %substr robust

Make %substr robust to handle -1,-1 parameters
and restore old behavior when number of characters
in substring is greater then length of string itself.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
preproc.c