Skip to content

Commit

Permalink
Runtime: fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Apr 27, 2022
1 parent 5b6201c commit a87f156
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
## Bug fixes
* Compiler: fix rewriter bug in share_constant (fix #1247)
* Runtime: fix Out_channel.is_buffered, set_buffered
* Runtime: fix format wrt alternative

# 4.0.0 (2021-01-24) - Lille
## Features/Changes
Expand Down
2 changes: 1 addition & 1 deletion runtime/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function caml_finish_formatting(f, rawbuffer) {
else if (f.signstyle != '-') buffer += f.signstyle;
}
if (f.alternate && f.base == 8) buffer += '0';
if (f.alternate && f.base == 16) buffer += "0x";
if (f.alternate && f.base == 16) buffer += f.uppercase?"0X":"0x";
if (f.justify == '+' && f.filler == '0')
for (var i = len; i < f.width; i++) buffer += '0';
buffer += rawbuffer;
Expand Down

0 comments on commit a87f156

Please sign in to comment.