ruby/trema/vendor.c in trema-0.3.0 vs ruby/trema/vendor.c in trema-0.3.1
- old
+ new
@@ -205,10 +205,10 @@
rb_hash_aset( attributes, ID2SYM( rb_intern( "transaction_id" ) ), UINT2NUM( transaction_id ) );
rb_hash_aset( attributes, ID2SYM( rb_intern( "vendor" ) ), UINT2NUM( vendor ) );
if ( data != NULL && data->length > 0 ) {
VALUE data_array = rb_ary_new2( ( long ) data->length );
- long i;
+ size_t i;
for ( i = 0; i < data->length; i++ ) {
rb_ary_push( data_array, INT2FIX( ( ( uint8_t * ) data->data)[ i ] ) );
}
rb_hash_aset( attributes, ID2SYM( rb_intern( "data" ) ), data_array );
}