mirror of
https://github.com/msgpack/msgpack-c
synced 2026-06-08 16:11:40 +00:00
Handle unsupported typecode
This commit is contained in:
committed by
Moriyoshi Koizumi
parent
003fb3392f
commit
ee16e2eb30
@@ -4,6 +4,7 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
"unsafe"
|
||||
"strconv"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
@@ -264,6 +265,8 @@ func unpack(reader io.Reader, reflected bool) (v reflect.Value, n int, err os.Er
|
||||
}
|
||||
nbytesread += n
|
||||
if e != nil { return nil, nbytesread, e }
|
||||
default:
|
||||
panic("unsupported code: " + strconv.Itoa(int(c)))
|
||||
}
|
||||
}
|
||||
return retval, nbytesread, nil
|
||||
|
||||
Reference in New Issue
Block a user