diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-16 21:24:47 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-16 21:24:47 -0700 |
commit | 65ccad4c6e50ea4298f8e661a8cf79174e970d73 (patch) | |
tree | 433e5961debeca0d3f6741176f23bff1772f4c9b | |
parent | 0f125d5ff163fafbf5531ce9f54f1021f0277b10 (diff) | |
download | mu-65ccad4c6e50ea4298f8e661a8cf79174e970d73.tar.gz |
1388
-rw-r--r-- | 002test.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/002test.cc b/002test.cc index 12c68df9..99ef38b1 100644 --- a/002test.cc +++ b/002test.cc @@ -86,6 +86,7 @@ bool is_integer(const string& s) { long long int to_integer(string n) { char* end = NULL; + // safe because string.c_str() is guaranteed to be null-terminated long long int result = strtoll(n.c_str(), &end, /*any base*/0); assert(*end == '\0'); return result; |