From 2f8917f45047bfba76733a3c742e77485bd1bb8c Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Fri, 21 Mar 2003 21:57:43 +0000 Subject: [PATCH] wc/le: Refuse to pack files without relocations. This should be fixed. committer: mfx 1048283863 +0000 --- TODO | 2 ++ src/p_wcle.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/TODO b/TODO index d77ae61b..c982b9b4 100644 --- a/TODO +++ b/TODO @@ -65,6 +65,8 @@ FORMAT TMT/ADAM FORMAT WATCOM/LE ================ +- handle files without relocations + - the decompressors are already aligned, no need for an extra alignment diff --git a/src/p_wcle.cpp b/src/p_wcle.cpp index f7482252..9692e4ad 100644 --- a/src/p_wcle.cpp +++ b/src/p_wcle.cpp @@ -274,6 +274,12 @@ void PackWcle::preprocessFixups() for (ic = jc = 0; ic < objects; ic++) jc += counts[ic]; + if (jc == 0) + { + // FIXME: implement this + thowCantPack("files without relocations are not supported"); + } + ByteArray(rl, jc); ByteArray(srf, counts[objects+0]+1); ByteArray(slf, counts[objects+1]+1);