fontforge/fontforge — pull request #1698 by jtanx (2014-08-29 08:17:31+00:00)
Title: psread.c: Remove (originally) unreached code that broke autotrace

This fixes a bug (autotrace is broken) that someone reported. Without this fix, attempting to use autotrace (at least on Windows; using potrace) creates a spurious/unusable trace, or it can crash FF.

I believe that this code was always unreached (since 2003 when it was written), so I removed it. I don't know what this code was meant to do, so if anybody does know what it is meant to do, that would help. Long explanation follows.

---------

Commit b2a6cbb563d049a033508ec85fef583d14f38ac6 introduced the original code
with check

if (sp < sizeof(stack)/sizeof(stack[0]))

But as `stack` is a pointer, the result was comparing `sp < 0`, which
can never occur (sp >= 0). Hence this code block was never executed.

Commit a2c8bab1914abe2d6d1c012d8b57bf6444ce9e02 changed the code to be:

if (sp < stacktop)

Which I can only guess is what it should be, *if* the code in the
code block worked with the current code.