diff options
author | Johannes Hofmann <johannes.hofmann@gmx.de> | 2004-06-29 15:26:20 +0000 |
---|---|---|
committer | Johannes Hofmann <johannes.hofmann@gmx.de> | 2004-06-29 15:26:20 +0000 |
commit | f2fd45ae52f56fe0c738dd0b95aecdf52b252962 (patch) | |
tree | 24fbe9e50e282ffeae5fecf07026a8c11b283eef /src/PSEditWidget.cxx | |
parent | 5f969cbc52a0778a3b30394bd77bdeff63159ffd (diff) |
adjust license fix SIGSEGV when saving large documents
adjust license
fix SIGSEGV when saving large documents
Diffstat (limited to 'src/PSEditWidget.cxx')
-rw-r--r-- | src/PSEditWidget.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/PSEditWidget.cxx b/src/PSEditWidget.cxx index d3c54ad..6f4fc54 100644 --- a/src/PSEditWidget.cxx +++ b/src/PSEditWidget.cxx @@ -1,5 +1,5 @@ // -// "$Id: PSEditWidget.cxx,v 1.9 2004/06/28 19:43:16 hofmann Exp $" +// "$Id: PSEditWidget.cxx,v 1.10 2004/06/29 17:26:20 hofmann Exp $" // // PSEditWidget routines. // @@ -269,7 +269,9 @@ int PSEditWidget::save(const char* savefile) { while (fgets(linebuf, 1024, fp) != NULL) { if (strcmp(linebuf, "showpage\n") == 0) { - to_ps(sfp, p); + if (p < max_pages) { + to_ps(sfp, p); + } p++; } fprintf(sfp, "%s", linebuf); |