diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-07 19:15:33 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-07 19:15:33 -0500 |
commit | f7108d547fc89836497492b7b5588759fd7f9a7d (patch) | |
tree | 7bf67d5fd4aa7875049ef7c8db57f90c4948503d /hscript/key.cc | |
parent | 476301116a3ce5818c157ff7efda83ce79b16b81 (diff) | |
download | horizon-f7108d547fc89836497492b7b5588759fd7f9a7d.tar.gz horizon-f7108d547fc89836497492b7b5588759fd7f9a7d.tar.bz2 horizon-f7108d547fc89836497492b7b5588759fd7f9a7d.tar.xz horizon-f7108d547fc89836497492b7b5588759fd7f9a7d.zip |
hscript: Allocate +lower+ properly
Diffstat (limited to 'hscript/key.cc')
-rw-r--r-- | hscript/key.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hscript/key.cc b/hscript/key.cc index a677670..d51e7d2 100644 --- a/hscript/key.cc +++ b/hscript/key.cc @@ -17,7 +17,7 @@ bool Horizon::Keys::BooleanKey::parse(const std::string what, const std::string where, const std::string key, bool *out) { - std::string lower; + std::string lower(what.size(), 0); std::transform(what.begin(), what.end(), lower.begin(), ::tolower); if(lower == "true" || lower == "yes" || lower == "1") { |