X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fexpressions%2Foperations.def;h=717bc15ef39fd105175f28e5625f9873522f9855;hb=393668423c1c9456fd82db6b30f25de078915da5;hp=95ac1e0b53ab2c14fdf86c8d4412e840f7335283;hpb=c646c399bf8c942a5e33abaa6c12336429c09f24;p=pspp-builds.git diff --git a/src/language/expressions/operations.def b/src/language/expressions/operations.def index 95ac1e0b..717bc15e 100644 --- a/src/language/expressions/operations.def +++ b/src/language/expressions/operations.def @@ -306,7 +306,7 @@ string function CONCAT (string a[n]) struct fixed_string dst; size_t i; - dst = alloc_string (e, 255); + dst = alloc_string (e, MAX_STRING); dst.length = 0; for (i = 0; i < n; i++) { @@ -314,8 +314,8 @@ string function CONCAT (string a[n]) size_t copy_len; copy_len = src->length; - if (dst.length + copy_len > 255) - copy_len = 255 - dst.length; + if (dst.length + copy_len > MAX_STRING) + copy_len = MAX_STRING - dst.length; memcpy (&dst.string[dst.length], src->string, copy_len); dst.length += copy_len; } @@ -440,7 +440,7 @@ string function UPCASE (string s) absorb_miss string function LPAD (string s, n) expression e; { - if (n < 0 || n > 255 || (int) n != n) + if (n < 0 || n > MAX_STRING || (int) n != n) return empty_string; else if (s.length >= n) return s; @@ -456,7 +456,7 @@ absorb_miss string function LPAD (string s, n) absorb_miss string function LPAD (string s, n, string c) expression e; { - if (n < 0 || n > 255 || (int) n != n || c.length != 1) + if (n < 0 || n > MAX_STRING || (int) n != n || c.length != 1) return empty_string; else if (s.length >= n) return s; @@ -472,7 +472,7 @@ absorb_miss string function LPAD (string s, n, string c) absorb_miss string function RPAD (string s, n) expression e; { - if (n < 0 || n > 255 || (int) n != n) + if (n < 0 || n > MAX_STRING || (int) n != n) return empty_string; else if (s.length >= n) return s; @@ -488,7 +488,7 @@ absorb_miss string function RPAD (string s, n) absorb_miss string function RPAD (string s, n, string c) expression e; { - if (n < 0 || n > 255 || (int) n != n || c.length != 1) + if (n < 0 || n > MAX_STRING || (int) n != n || c.length != 1) return empty_string; else if (s.length >= n) return s;