misode / brigadier-ts

TypeScript port of Mojang/brigadier
MIT License
18 stars 5 forks source link

Invalid integers and floats can be successfully parsed #8

Closed haykam821 closed 2 years ago

haykam821 commented 2 years ago

When parsing integers and floats, inputs with allowed characters (as determined by isAllowedNumber), such as ------1, can be passed to the parseInt or parseFloat method. However, since the results of these methods are not checked, they can return NaN.