about summary refs log tree commit diff stats
path: root/010vm.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-08-26 13:47:39 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-08-26 13:47:39 -0700
commit2efceef6c1626698984ee725ff733c2e0860a79e (patch)
treebca37265ed71fd1ca1436d91e534f77f193e990e /010vm.cc
parent7fd010710c0a34ff103bec3fb271f0c207bfcc53 (diff)
downloadmu-2efceef6c1626698984ee725ff733c2e0860a79e.tar.gz
3260
array length = number of elements
array size = in locations
Diffstat (limited to '010vm.cc')
-rw-r--r--010vm.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/010vm.cc b/010vm.cc
index 198244e4..e1d7497e 100644
--- a/010vm.cc
+++ b/010vm.cc
@@ -650,13 +650,13 @@ ostream& operator<<(ostream& os, no_scientific x) {
 
 string trim_floating_point(const string& in) {
   if (in.empty()) return "";
-  int len = SIZE(in);
-  while (len > 1) {
-    if (in.at(len-1) != '0') break;
-    --len;
+  int length = SIZE(in);
+  while (length > 1) {
+    if (in.at(length-1) != '0') break;
+    --length;
   }
-  if (in.at(len-1) == '.') --len;
-  return in.substr(0, len);
+  if (in.at(length-1) == '.') --length;
+  return in.substr(0, length);
 }
 
 void test_trim_floating_point() {