Merge branch 'stbi_hdr_info_overread' of https://github.com/baldurk/stb into working

This commit is contained in:
Sean Barrett 2016-01-16 08:05:51 -08:00
commit 5746aa023a
2 changed files with 3 additions and 2 deletions

View File

@ -17,7 +17,7 @@ free to tell me about their quality.) _Newest additions are in italics._
- **strings** [utf8](https://github.com/sheredom/utf8.h): utf8 string library (public domain)
- **misc** [MakeID.h](http://www.humus.name/3D/MakeID.h): allocate/deallocate small integer IDs efficiently (public domain)
- **misc** [gb_string.h](https://github.com/gingerBill/gb): dynamic strings for C (public domain)
- _**misc** [loguru](https://github.com/emilk/loguru): flexible logging for C++ (public domain)
- _**misc** [loguru](https://github.com/emilk/loguru): flexible logging for C++ (public domain)_
- _**hardware** [EasyTab](https://github.com/ApoorvaJ/EasyTab): multi-platform tablet input (public domain)_
Not public domain:
@ -52,6 +52,7 @@ this! But you might like them anyway:
- **2D** [noc_turtle](https://github.com/guillaumechereau/noc): procedural graphics generator (public domain)
- **geometry** [Tomas Akenine-Moller snippets](http://fileadmin.cs.lth.se/cs/Personal/Tomas_Akenine-Moller/code/): various 3D intersection calculations, not lib-ified (public domain)
- **geometry** [Clipper](http://www.angusj.com/delphi/clipper.php): line & polygon clipping & offsetting (Boost license)
- _**geometry** [PolyPartition](https://github.com/ivanfratric/polypartition): polygon triangulation, partitioning (MIT license)_
- **network** [yocto](https://github.com/tom-seddon/yhs): non-production-use http server (public domain)
- **network** [happyhttp](http://scumways.com/happyhttp/happyhttp.html): http client requests (zlib license)
- **network** [mongoose](https://github.com/cesanta/mongoose): http server (GPL v2)

View File

@ -6053,7 +6053,7 @@ static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp)
char *token;
int valid = 0;
if (strcmp(stbi__hdr_gettoken(s,buffer), "#?RADIANCE") != 0) {
if (stbi__hdr_test(s) == 0) {
stbi__rewind( s );
return 0;
}