aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2010-10-29 11:59:30 +0200
committerBjörn Gustavsson <bjorn@erlang.org>2010-10-29 11:59:36 +0200
commitc14970e178a7cef8dcb214653f9fc9b6c741ce10 (patch)
treec261be3cbc27a20f8e340330298fd4041a1fe165 /lib/stdlib/src
parente3ef31fe6b728ccc2149cac7e1b3e10d0a65ec6f (diff)
parentb9fc6c54079d4932fb156b9dad1f5c3ec946f952 (diff)
downloadotp-c14970e178a7cef8dcb214653f9fc9b6c741ce10.tar.gz
otp-c14970e178a7cef8dcb214653f9fc9b6c741ce10.tar.bz2
otp-c14970e178a7cef8dcb214653f9fc9b6c741ce10.zip
Merge branch 'ms/fix-string-copies' into dev
* ms/fix-string-copies: string_SUITE: Add test for string:copies(Str, Float) string_SUITE: Fix copy and paste error in test of string:copies/2 Fix crash in string:copies/2 OTP-8915
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/string.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/stdlib/src/string.erl b/lib/stdlib/src/string.erl
index 6636a03f06..c987c224db 100644
--- a/lib/stdlib/src/string.erl
+++ b/lib/stdlib/src/string.erl
@@ -201,7 +201,7 @@ chars(C, 0, Tail) when is_integer(C) ->
-spec copies(string(), non_neg_integer()) -> string().
-copies(CharList, Num) when is_list(CharList), Num >= 0 ->
+copies(CharList, Num) when is_list(CharList), is_integer(Num), Num >= 0 ->
copies(CharList, Num, []).
copies(_CharList, 0, R) ->