diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-28 12:10:30 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-28 12:10:30 -0700 |
commit | cc2e309358470dfa3fba0f3c32411c2f7added19 (patch) | |
tree | 14f62e00798744b9ec8e89a1108dea489082e774 | |
parent | 0ee122498079ff28f493c2110c7e693c6b831bd8 (diff) | |
download | mu-cc2e309358470dfa3fba0f3c32411c2f7added19.tar.gz |
1208
-rw-r--r-- | cpp/060string.mu | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/060string.mu b/cpp/060string.mu index 6f0929f1..52b1e601 100644 --- a/cpp/060string.mu +++ b/cpp/060string.mu @@ -247,7 +247,7 @@ recipe integer-to-decimal-string [ negative?:boolean <- lesser-than n:integer, 0:literal break-unless negative?:boolean negate-result:boolean <- copy 1:literal - n:integer <- multiply n:integer -1:literal + n:integer <- multiply n:integer, -1:literal } # add digits from right to left into intermediate buffer tmp:address:buffer <- init-buffer 30:literal @@ -267,7 +267,7 @@ recipe integer-to-decimal-string [ } # reverse buffer into string result len:integer <- get tmp:address:buffer/deref, length:offset - buf:address:array:character <- get tmp:address:buffer/deref data:offset + buf:address:array:character <- get tmp:address:buffer/deref, data:offset result:address:array:character <- new character:type, len:integer i:integer <- subtract len:integer, 1:literal j:integer <- copy 0:literal |