changeset 70:50b2a696666a

avoid %rep error when no filename specified
author C. Masloch <pushbx@ulukai.org>
date Mon, 14 Dec 2020 13:07:38 +0100
parents 9cf2837317b5
children 604f416c159f
files bootimg.asm
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bootimg.asm	Tue Dec 08 16:36:54 2020 +0100
+++ b/bootimg.asm	Mon Dec 14 13:07:38 2020 +0100
@@ -1120,9 +1120,15 @@
  %elifidni %1, ::endfill
   %assign isfill 4
  %elifnidni %1, ::empty
+  %ifidn %1, ""
+   %error Invalid filename
+  %elifempty %1
+   %error Invalid filename
+  %else
 	setup_a_section		; add a section for a file
 	incfile %1, %1, data %+ chainindex, %$parent
-  %assign chainindex chainindex + 1
+   %assign chainindex chainindex + 1
+  %endif
  %endif
  %rotate 1
 %endrep