# HG changeset patch # User jwe # Date 1165435803 0 # Node ID cb8c62c78b42f7176bf9b96a339ed98efc07af71 # Parent 312bd357684436cc7005a6b8c0b79ddfda71f3ca [project @ 2006-12-06 20:10:02 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2006-12-06 John W. Eaton + +2006-12-06 Michael Goffioul + + * mappers.cc (install_mapper_functions): Undefine isascii before + the DEFUN_MAPPER for it. + + * input.cc (get_user_input): Prevent out of bounds array access + when checking for EOL. + 2006-12-05 John W. Eaton * ls-oct-ascii.cc (extract_keyword): If no match and looking for diff --git a/src/input.cc b/src/input.cc --- a/src/input.cc +++ b/src/input.cc @@ -283,7 +283,7 @@ size_t len = retval.length (); - if (retval[len-1] != '\n') + if (len > 0 && retval[len-1] != '\n') retval.append ("\n"); } } diff --git a/src/input.h b/src/input.h --- a/src/input.h +++ b/src/input.h @@ -31,7 +31,6 @@ #include #include "oct-time.h" -#include "ov-list.h" #include "pager.h" class octave_value; diff --git a/src/mappers.cc b/src/mappers.cc --- a/src/mappers.cc +++ b/src/mappers.cc @@ -414,6 +414,10 @@ or @code{islower (@var{s})} is true).\n\ @end deftypefn"); +#ifdef isascii +#undef isascii +#endif + DEFUN_MAPPER (isascii, xisascii, 0, 0, 0, 0, 0, 0.0, 0.0, 0, 0, "-*- texinfo -*-\n\ @deftypefn {Mapping Function} {} isascii (@var{s})\n\