Fix bug #613088 - Fl_Text_Display crash.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2638 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-09-26 20:27:16 +00:00
parent a1b7e13ba9
commit 0c0035904c
4 changed files with 17 additions and 10 deletions

View File

@ -1,3 +1,9 @@
CHANGES IN FLTK 1.1.0
- Added some more range checking to the Fl_Text_Display
widget.
CHANGES IN FLTK 1.1.0rc7
- Updated the Fl_Text_Buffer and Fl_Text_Display classes

View File

@ -1,7 +1,7 @@
dnl -*- sh -*-
dnl the "configure" script is made from this by running GNU "autoconf"
dnl
dnl "$Id: configure.in,v 1.33.2.31.2.86 2002/09/17 20:27:17 easysw Exp $"
dnl "$Id: configure.in,v 1.33.2.31.2.87 2002/09/26 20:27:16 easysw Exp $"
dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl
@ -35,7 +35,7 @@ dnl FLTK library versions...
FL_MAJOR_VERSION=1
FL_MINOR_VERSION=1
FL_PATCH_VERSION=0
FL_RELEASE_VERSION=rc7
FL_RELEASE_VERSION=
FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
AC_SUBST(FL_MAJOR_VERSION)
@ -785,5 +785,5 @@ dnl Make sure the fltk-config script is executable...
chmod +x fltk-config
dnl
dnl End of "$Id: configure.in,v 1.33.2.31.2.86 2002/09/17 20:27:17 easysw Exp $".
dnl End of "$Id: configure.in,v 1.33.2.31.2.87 2002/09/26 20:27:16 easysw Exp $".
dnl

View File

@ -1,5 +1,5 @@
#
# "$Id: fltk.spec,v 1.1.2.9.2.16 2002/09/17 20:27:17 easysw Exp $"
# "$Id: fltk.spec,v 1.1.2.9.2.17 2002/09/26 20:27:16 easysw Exp $"
#
# RPM spec file for FLTK.
#
@ -23,7 +23,7 @@
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
%define version 1.1.0rc7
%define version 1.1.0
%define release 0
%define prefix /usr
@ -97,5 +97,5 @@ rm -rf $RPM_BUILD_ROOT
%{prefix}/share/doc/fltk/*
#
# End of "$Id: fltk.spec,v 1.1.2.9.2.16 2002/09/17 20:27:17 easysw Exp $".
# End of "$Id: fltk.spec,v 1.1.2.9.2.17 2002/09/26 20:27:16 easysw Exp $".
#

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Text_Display.cxx,v 1.12.2.28 2002/09/20 19:59:45 easysw Exp $"
// "$Id: Fl_Text_Display.cxx,v 1.12.2.29 2002/09/26 20:27:16 easysw Exp $"
//
// Copyright 2001-2002 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@ -742,6 +742,7 @@ int Fl_Text_Display::position_to_xy( int pos, int* X, int* Y ) {
/* Calculate Y coordinate */
if (!position_to_line(pos, &visLineNum)) return 0;
if (visLineNum < 0 || visLineNum >= nNBufferLines) return 0;
fontHeight = mMaxsize;
*Y = text_area.y + visLineNum * fontHeight;
@ -1332,8 +1333,8 @@ void Fl_Text_Display::reset_absolute_top_line_number() {
int Fl_Text_Display::position_to_line( int pos, int *lineNum ) {
int i;
if ( pos < mFirstChar )
return 0;
*lineNum = 0;
if ( pos < mFirstChar ) return 0;
if ( pos > mLastChar ) {
if ( empty_vlines() ) {
if ( mLastChar < mBuffer->length() ) {
@ -3007,5 +3008,5 @@ int Fl_Text_Display::handle(int event) {
//
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.28 2002/09/20 19:59:45 easysw Exp $".
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.29 2002/09/26 20:27:16 easysw Exp $".
//