Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix write_time for 32bit platform

  • Loading branch information...
commit f8e7182e739cbf7b70685b4b6af4c270629ab8fa 1 parent 9e80f0a
@qqshfox qqshfox authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 ext/rocketamf_ext/serializer.c
View
8 ext/rocketamf_ext/serializer.c
@@ -229,8 +229,8 @@ static VALUE ser0_write_time(VALUE self, VALUE time) {
// Write time
time = rb_obj_dup(time);
rb_funcall(time, id_utc, 0);
- long tmp_num = NUM2DBL(rb_funcall(time, id_to_f, 0)) * 1000;
- ser_write_double(ser, (double)tmp_num);
+ double tmp_num = NUM2DBL(rb_funcall(time, id_to_f, 0)) * 1000;
+ ser_write_double(ser, tmp_num);
ser_write_uint16(ser, 0); // Time zone
}
@@ -549,8 +549,8 @@ static VALUE ser3_write_time(VALUE self, VALUE time_obj) {
ser_write_byte(ser, AMF3_NULL_MARKER); // Ref header
time_obj = rb_obj_dup(time_obj);
rb_funcall(time_obj, id_utc, 0);
- long tmp_num = NUM2DBL(rb_funcall(time_obj, id_to_f, 0)) * 1000;
- ser_write_double(ser, (double)tmp_num);
+ double tmp_num = NUM2DBL(rb_funcall(time_obj, id_to_f, 0)) * 1000;
+ ser_write_double(ser, tmp_num);
}
static VALUE ser3_write_date(VALUE self, VALUE date) {
Please sign in to comment.
Something went wrong with that request. Please try again.