Skip to content

Commit

Permalink
Fix NaN object dump issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ohler55 committed Jul 2, 2022
1 parent e8285a7 commit f0122cf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 3.13.15 - 2022-07-03

- Fixed issue dumping NaN value in object mode.

## 3.13.14 - 2022-06-03

- Double fclose() due to bad merger fixed by tonobo.
Expand Down
2 changes: 1 addition & 1 deletion ext/oj/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ void oj_dump_float(VALUE obj, int depth, Out out, bool as_ok) {
} else if (isnan(d)) {
if (ObjectMode == out->opts->mode) {
strcpy(buf, nan_val);
cnt = sizeof(ninf_val) - 1;
cnt = sizeof(nan_val) - 1;
} else {
NanDump nd = out->opts->dump_opts.nan_dump;

Expand Down
2 changes: 1 addition & 1 deletion lib/oj/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

module Oj
# Current version of the module.
VERSION = '3.13.14'
VERSION = '3.13.15'
end

0 comments on commit f0122cf

Please sign in to comment.