diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-02-09 12:41:54 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-02-09 12:41:54 +0000 |
commit | d0eda1f3e9b2030e373038fd8997f033f2d7aedd (patch) | |
tree | 9db733f87fceaba36ddcba54b794b8be06c1d136 /src/libexpr/primops.cc | |
parent | 3854fc9b42d16b810f62b64194b699033b03aaf1 (diff) | |
parent | 543988572e2abc85767da315b2acc1f971c5d07f (diff) |
* Merged the SQLite branch.
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index a4812de06..3e955ea3f 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -965,7 +965,7 @@ static void prim_substring(EvalState & state, Value * * args, Value & v) if (start < 0) throw EvalError("negative start position in `substring'"); - mkString(v, string(s, start, len), context); + mkString(v, start >= s.size() ? "" : string(s, start, len), context); } |