mmp / pbrt-v3

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
http://pbrt.org
BSD 2-Clause "Simplified" License
4.87k stars 1.18k forks source link

Bad control flow in parser.cpp decodeEscaped #186

Closed LegalizeAdulthood closed 6 years ago

LegalizeAdulthood commented 6 years ago

https://github.com/mmp/pbrt-v3/blob/ed57aff6cbd04af7f2e3b6d98bfc40cce97a8099/src/core/parser.cpp#L73

On this line, Error will log the message and then fall through to the next case. This doesn't seem right... The same thing can happen with the default: case and the return 0 at the end of the function is marked NOTREACHED, but it seems that it can certainly be reached.

mmp commented 6 years ago

Thanks!