From 3ca84fa3246c8fd45d7712981feb7e5701f9b55a Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Thu, 22 Jan 2009 16:43:05 +0000 Subject: 20090122-1642 --- CHANGES | 2 ++ include/version.h | 2 +- libinterp/string.c | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 92f76fc8..5f9ba509 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,6 @@ 20081119 +20090122 + libinterp/string.c: slicer can return H for empty slice after bounds check os/pc/^(main.c fns.h) more idle idlehands 20081112 emu/Linux/asm-arm.S old failure to use different regs for swp finally changed here diff --git a/include/version.h b/include/version.h index eaf0f8ac..65643b7c 100644 --- a/include/version.h +++ b/include/version.h @@ -1 +1 @@ -#define VERSION "Fourth Edition (20081119)" +#define VERSION "Fourth Edition (20090122)" diff --git a/libinterp/string.c b/libinterp/string.c index 4a4eb54e..32320d56 100644 --- a/libinterp/string.c +++ b/libinterp/string.c @@ -131,6 +131,8 @@ slicer(ulong start, ulong v, String *ds) l = -ds->len; if(v < start || v > l) error(exBounds); + if(nc == 0) + return H; ns = newrunes(nc); memmove(ns->Srune, &ds->Srune[start], nc*sizeof(Rune)); } @@ -138,6 +140,8 @@ slicer(ulong start, ulong v, String *ds) l = ds->len; if(v < start || v > l) error(exBounds); + if(nc == 0) + return H; ns = newstring(nc); memmove(ns->Sascii, &ds->Sascii[start], nc); } -- cgit v1.2.3