Skip to content

Commit

Permalink
Fixed issue #373 (#402)
Browse files Browse the repository at this point in the history
Co-authored-by: Ferdinand Neman <[email protected]>
  • Loading branch information
newm4n and Ferdinand Neman authored Aug 29, 2023
1 parent 8da01ee commit eb4f61d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ast/Serializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1535,11 +1535,15 @@ func (meta *ConstantMeta) ReadMetaFrom(reader io.Reader) error {
return err
}
byteArr := make([]byte, length)
_, err = reader.Read(byteArr)
readCount, err := reader.Read(byteArr)
if err != nil {

return err
}
if uint64(readCount) != length {

return io.ErrShortBuffer
}
meta.ValueBytes = byteArr

b, err := ReadBoolFromReader(reader)
Expand Down

0 comments on commit eb4f61d

Please sign in to comment.