From 44e7225ce6fc5ae5b153b932ab00b41d46fe4dc2 Mon Sep 17 00:00:00 2001 From: uz Date: Sat, 21 Jan 2012 21:35:49 +0000 Subject: [PATCH] Fixed an internal error that was triggered by an attempt to move an empty list of instructions in the code segment (Oliver Schmidt). git-svn-id: svn://svn.cc65.org/cc65/trunk@5419 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/codeseg.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cc65/codeseg.c b/src/cc65/codeseg.c index 52516abfe..fff502d3e 100644 --- a/src/cc65/codeseg.c +++ b/src/cc65/codeseg.c @@ -655,6 +655,11 @@ void CS_MoveEntries (CodeSeg* S, unsigned Start, unsigned Count, unsigned NewPos * current code end) */ { + /* Transparently handle an empty range */ + if (Count == 0) { + return; + } + /* If NewPos is at the end of the code segment, move any labels from the * label pool to the first instruction of the moved range. */