mi: correctness fixes for unmarshal, resource leak, and test robustness (#2501)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau
2026-10-07 17:59:40 +02:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 049cab563b
commit 6cdc9db241
9 changed files with 711 additions and 154 deletions
+3 -2
View File
@@ -20,6 +20,7 @@ package mi
import (
"errors"
"fmt"
"math"
"unsafe"
"golang.org/x/sys/windows"
@@ -91,9 +92,9 @@ func (e *Element) GetValue() (any, error) {
case ValueTypeSINT64:
return int64(e.value), nil
case ValueTypeREAL32:
return float32(e.value), nil
return math.Float32frombits(uint32(e.value)), nil
case ValueTypeREAL64:
return float64(e.value), nil
return math.Float64frombits(uint64(e.value)), nil
case ValueTypeCHAR16:
return uint16(e.value), nil
case ValueTypeDATETIME: