Fix array assignment size validation to accept equal sizes.

This commit is contained in:
David Brown 2016-12-14 16:55:16 +00:00
parent 1e9c1af8ef
commit e85091289e
2 changed files with 2 additions and 2 deletions

View file

@ -790,7 +790,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96
OPM.WriteString("__X("); OPM.WriteString("__X(");
OPC.Len(r.obj, r.typ, 0); OPM.WriteString(" * "); OPM.WriteInt(r.typ.BaseTyp.size); OPC.Len(r.obj, r.typ, 0); OPM.WriteString(" * "); OPM.WriteInt(r.typ.BaseTyp.size);
OPM.WriteString(", "); OPM.WriteString(", ");
OPM.WriteInt(l.typ.size); OPM.WriteInt(l.typ.size+1); (* _X vaidates 0 .. n-1 so we need to +1. *)
OPM.Write(")") OPM.Write(")")
ELSE (* Array to array copy. *) ELSE (* Array to array copy. *)
ASSERT(r.typ.comp = OPT.Array); ASSERT(r.typ.size <= l.typ.size); ASSERT(r.typ.comp = OPT.Array); ASSERT(r.typ.size <= l.typ.size);

View file

@ -106,7 +106,7 @@ void determineOS() {
#ifdef _WIN32 #ifdef _WIN32
os = "windows"; platform = "windows"; binext = ".exe"; staticlink = ""; os = "windows"; platform = "windows"; binext = ".exe"; staticlink = "";
#else #else
os = "unknown"; platform = "unix"; binext = ""; staticlink = "-static"; os = "unknown"; platform = "unix"; binext = ""; staticlink = " -static";
struct utsname sys; struct utsname sys;
if (uname(&sys)<0) fail("Couldn't get sys name - uname() failed."); if (uname(&sys)<0) fail("Couldn't get sys name - uname() failed.");