View Issue Details

IDProjectCategoryView StatusLast Update
0031610RunnerWindows (YYC)Public2020-02-27 12:00
ReporterYellowAfterlifeAssigned ToRussell Kay 
PriorityVery LowSeverityC - GeneralReproducibility100%
Status ResolvedResolutionFixed 
PlatformWindowsOSWindows 10 ProOS Version>=18362
Product Version2.2.5 
Target Version2.3.0Fixed in Version2.3.0 
Summary0031610: YYC: int32 += a_double rounds the float
Description
// can't get an int32 easier than this?
var b = buffer_create(4, buffer_fixed, 1);
buffer_poke(b, 0, buffer_s32, 1);
var i = buffer_peek(b, 0, buffer_s32);
i += 2.5;
show_debug_message(i); // 3.5 on VM, 3 on YYC
Additional InformationThis happens due to this bit in YYRValue& operator+=(const double rhs)
case VALUE_INT32:
            val = v32 + (int32)rhs;
            kind = VALUE_REAL;
            break;

based on YYRValue& operator+=(const YYRValue& rhs) (which works fine), it should have been
case VALUE_INT32:
            val = (double)v32 + rhs;
            kind = VALUE_REAL;
            break;
Tagsyyc
1.4 Found In
2.x Runtime Found In9.9.1.1685
2.x Runtime Verified In

Activities

YellowAfterlife

2020-02-09 11:10

Developer  

a_bug.yyz (8,834 bytes)

Russell Kay

2020-02-18 22:23

Manager   ~0065375

Fixed in gitlab