Fix decimal display
authorAlexander Aksenov <a.aksenov@samsung.com>
Fri, 10 Aug 2018 13:39:45 +0000 (16:39 +0300)
committerAlexander Aksenov <a.aksenov@samsung.com>
Fri, 10 Aug 2018 14:00:01 +0000 (17:00 +0300)
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
src/debug/netcoredbg/valueprint.cpp

index 457db3d..d5dcf30 100644 (file)
@@ -376,12 +376,13 @@ static HRESULT PrintDecimalValue(ICorDebugValue *pValue,
 
     if (len > scale)
     {
-        if (scale != 0) output.insert(len - scale, 1, '.');
+        if (scale != 0)
+            output.insert(len - scale, 1, '.');
     }
     else
     {
         output.insert(0, "0.");
-        output.insert(2, scale, '0');
+        output.insert(2, scale - len, '0');
     }
 
     if (is_negative)