Skip to content

Commit

Permalink
fix amazon-ion#221 - Ion binary floating point exception
Browse files Browse the repository at this point in the history
The global decContext `g_IonEventDecimalContext` has traps set to
DEC_Errors, which wouldn't be set if `decContextDefault()` would be
used with any `kind` but DEC_INIT_BASE.
  • Loading branch information
m6w6 authored and tgregg committed Nov 23, 2021
1 parent 61b83cb commit 593fb50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/events/ion_event_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ decContext g_IonEventDecimalContext = {
DEC_MAX_MATH, // max exponent
-DEC_MAX_MATH, // min exponent
DEC_ROUND_HALF_EVEN, // rounding mode
DEC_Errors, // trap conditions
0, // trap conditions
0, // status flags
0 // apply exponent clamp?
};
Expand Down

0 comments on commit 593fb50

Please sign in to comment.