diff --git a/panda/src/gobj/shader.cxx b/panda/src/gobj/shader.cxx index fc458ccaef..e01c123c66 100644 --- a/panda/src/gobj/shader.cxx +++ b/panda/src/gobj/shader.cxx @@ -2876,7 +2876,7 @@ r_preprocess_source(ostream &out, istream &in, const Filename &fn, source_dir = full_fn.get_dirname(); incfn = incfile; - } else if (sscanf(line.c_str(), " # pragma%*[ \t]include <%2047[^\>]> %zn", incfile, &nread) == 1 + } else if (sscanf(line.c_str(), " # pragma%*[ \t]include <%2047[^>]> %zn", incfile, &nread) == 1 && nread == line.size()) { // Angled includes are also OK, but we don't search in the directory // of the source file.