From 5da8feffae62c98343630e87d2d7cc120415166c Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 17 Aug 2011 09:55:33 +0200 Subject: [PATCH] PR13103 substr 3 argument length description is wrong. --- tapset/string.stp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tapset/string.stp b/tapset/string.stp index 9d3e65b7a..c3ecc4d81 100644 --- a/tapset/string.stp +++ b/tapset/string.stp @@ -25,8 +25,10 @@ function strlen:long(s:string) %{ /* pure */ /* unprivileged */ * @start: starting position of the extracted string (first character is 0) * @length: length of string to return * - * Description: Returns the substring of the up to the given length - * starting at the given start position and ending at given stop position. + * Description: Returns the substring of the given string at the given + * start position with the given length (or smaller if the length of the + * original string is less than start + length, or length is bigger than + * MAXSTRINGLEN). */ function substr:string(str:string,start:long, length:long) %{ /* pure */ /* unprivileged */ int64_t length = clamp_t(int64_t, THIS->length + 1, 0, MAXSTRINGLEN); -- 2.43.5