From 9795ed654e7b8daaff0bef1ccae1507ff659d3bd Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Thu, 6 Jul 2017 12:58:23 -0700 Subject: Fix bug in `String::To{Upper|Lower}` These were accidentally calling the version of `String::append()` that takes an `int` and prints its decimal value, rather than the version that takes a `char` and appends the corresponding ASCII character. --- source/core/slang-string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/core/slang-string.h b/source/core/slang-string.h index ba68e405e..3c1b48e8c 100644 --- a/source/core/slang-string.h +++ b/source/core/slang-string.h @@ -506,7 +506,7 @@ namespace Slang String result; for (auto c : *this) { - int d = (c >= 'a' && c <= 'z') ? (c - ('a' - 'A')) : c; + char d = (c >= 'a' && c <= 'z') ? (c - ('a' - 'A')) : c; result.append(d); } return result; @@ -517,7 +517,7 @@ namespace Slang String result; for (auto c : *this) { - int d = (c >= 'A' && c <= 'Z') ? (c - ('A' - 'a')) : c; + char d = (c >= 'A' && c <= 'Z') ? (c - ('A' - 'a')) : c; result.append(d); } return result; -- cgit v1.2.3