From: Ken Hornstein Date: Thu, 16 Feb 2012 16:46:16 +0000 (-0500) Subject: Report an error when the width used by putaddr is less than the label width. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/aec3e4eb82ab61699f1539ad7b62f4c3ecdbf4ea?ds=sidebyside;hp=dd0acb9f9e2206182c738c2fa5e1d9775b7fda48 Report an error when the width used by putaddr is less than the label width. --- diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index 89023cbc..f689300f 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -822,6 +822,10 @@ fmt_scan (struct format *format, char *scanl, int width, int *dat) sp = fmt->f_text; indent = strlen (sp); wid -= indent; + if (wid <= 0) { + adios(NULL, "putaddr -- num register (%d) must be greater " + "than label width (%d)", value, indent); + } while( (c = *sp++) && cp < ep) *cp++ = c; while (len > wid) {