From f2fd45ae52f56fe0c738dd0b95aecdf52b252962 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 29 Jun 2004 15:26:20 +0000 Subject: adjust license fix SIGSEGV when saving large documents adjust license fix SIGSEGV when saving large documents --- src/PSEditWidget.cxx | 6 ++++-- src/flpsed.cxx | 12 ++++++------ 2 files changed, 10 insertions(+), 8 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); diff --git a/src/flpsed.cxx b/src/flpsed.cxx index 1344bce..6506185 100644 --- a/src/flpsed.cxx +++ b/src/flpsed.cxx @@ -1,21 +1,21 @@ // -// "$Id: flpsed.cxx,v 1.10 2004/06/28 19:43:16 hofmann Exp $" +// "$Id: flpsed.cxx,v 1.11 2004/06/29 17:26:20 hofmann Exp $" // // flpsed program. // // Copyright 2004 by Johannes Hofmann // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // -// This library is distributed in the hope that it will be useful, +// This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Library General Public License for more details. +// General Public License for more details. // -// You should have received a copy of the GNU Library General Public +// You should have received a copy of the GNU General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA. -- cgit v1.2.3