Fix ambiguity with size_t
authorArjen Baart <arjen@andromeda.nl>
Mon, 30 Mar 2020 14:06:44 +0000 (16:06 +0200)
committerArjen Baart <arjen@andromeda.nl>
Mon, 30 Mar 2020 14:06:44 +0000 (16:06 +0200)
src/string.cpp

index 7f99d83..dd159d0 100644 (file)
@@ -439,7 +439,7 @@ char& String::operator[](size_t i)
 {
    if (i >= strlen(p->s))
    {
-      throw StringException("Out of bounds: " + String(i));
+      throw StringException("Out of bounds: " + String((int)i));
    }
 
    return p->s[i];