shithub: rgbds

Download patch

ref: d3328406a2d2baf1365e1a9f8503c31f1f725384
parent: 3564b3f9eae6caa1ae0504d6a76cfbf46e578efe
author: ISSOtm <[email protected]>
date: Thu Jan 2 09:06:40 EST 2020

Improve `jr` out-of-reach error message

--- a/src/link/patch.c
+++ b/src/link/patch.c
@@ -306,7 +306,7 @@
 			int16_t offset = value - address;
 
 			if (offset < -128 || offset > 127)
-				errx(1, "%s(%d): jr target out of reach (%d)",
+				errx(1, "%s(%d): jr target out of reach (expected -129 < %d < 128)",
 				     patch->fileName, patch->lineNo, offset);
 			section->data[patch->offset] = offset & 0xFF;
 		} else {