# HG changeset patch # User Daniel J Sebald # Date 1424998678 21600 # Node ID 60fe3ef12bb0c1ea0a08b52ac9f0db4640286b3d # Parent c7c50030e76c6110ca47571e785f8699f68cbb95 Correct test for string-not-found, avoid substr crash in drawnow() (bug #44292) * graphics.cc (drawnow): Use proper check for a size_t value being not-found, rather than treating as signed number. diff -r c7c50030e76c -r 60fe3ef12bb0 libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Fri Feb 27 09:44:58 2015 -0500 +++ b/libinterp/corefcn/graphics.cc Thu Feb 26 18:57:58 2015 -0600 @@ -11070,7 +11070,7 @@ if (! error_state) { size_t pos = file.find_first_not_of ("|"); - if (pos > 0) + if (pos != std::string::npos) file = file.substr (pos); else {