ProtoDef-io / protodefc

Compiler for protodef written in Rust
11 stars 3 forks source link

Throw exception when not enough data in builtin javascript ? #12

Open rom1504 opened 7 years ago

rom1504 commented 7 years ago

See https://github.com/hansihe/protodefc/blob/master/backend_resources/javascript/builtins.js#L14 vs https://github.com/ProtoDef-io/node-protodef/blob/master/src/datatypes/numeric.js#L67 This is necessary to implement protocols that don't prefix the length (eg minecraft <=1.7)

ghost commented 6 years ago

How is this checked in normal Node?

rom1504 commented 6 years ago

See the second link I posted here for that (or search for that exception in node-protodef repo)