mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/bigdecimal] Explicitly cast size_t to int
https://github.com/ruby/bigdecimal/commit/b1f1ed26c9
This commit is contained in:
parent
b4ade73974
commit
4d13f3e9da
1 changed files with 1 additions and 1 deletions
|
@ -2830,7 +2830,7 @@ rb_float_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception)
|
|||
int decpt, negative_p;
|
||||
char *e;
|
||||
const int mode = digs == 0 ? 0 : 2;
|
||||
char *p = BigDecimal_dtoa(d, mode, digs, &decpt, &negative_p, &e);
|
||||
char *p = BigDecimal_dtoa(d, mode, (int)digs, &decpt, &negative_p, &e);
|
||||
int len10 = (int)(e - p);
|
||||
if (len10 >= (int)sizeof(buf))
|
||||
len10 = (int)sizeof(buf) - 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue