HuoLanguage / huo

interpreted language written in C
MIT License
212 stars 21 forks source link

Slightly more robust substring handling #18

Closed TheLoneWolfling closed 8 years ago

TheLoneWolfling commented 8 years ago

Note: this conflicts (albeit trivially) with pull request #15.

I don't know what you want a substring of a negative length to do - but I'm pretty sure that you don't want it to assign a negative length to the string, as that'll mess up all sorts of other things down the line.

Ditto, I don't know what you want to do with a substring that starts and/or ends with a negative position - but I'm pretty sure that just blindly trying to read before the string isn't what you want to do.

incrediblesound commented 8 years ago

Looks good, thanks!