From 387ddc412f87a0891470fd8f28c32ce4197e19b5 Mon Sep 17 00:00:00 2001
From: leslie <unknown>
Date: Mon, 28 Jan 2008 20:34:14 +0100
Subject: [PATCH] update testing

---
 testing/Makefile    | 2 ++
 testing/testN2Emu.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/testing/Makefile b/testing/Makefile
index 8ef82ce..06d00ef 100644
--- a/testing/Makefile
+++ b/testing/Makefile
@@ -57,10 +57,12 @@ testN1Emu: testN1Emu.o $(SHAREDOBJS) $(NOBJS)
 testN2Emu.o: testN2Emu.c compat.h
 testN2Emu: testN2Emu.o $(SHAREDOBJS) $(NOBJS)
 	$(CXX) $(CXXFLAGS) $^ $(LIBS) -L../systems/nagra -lsc-nagra -o $@
+	@echo "don't forget: export LD_LIBRARY_PATH=../systems/nagra"
 
 testN2RunEmu.o: testN2RunEmu.c
 testN2RunEmu: testN2RunEmu.o $(SHAREDOBJS) $(NOBJS)
 	$(CXX) $(CXXFLAGS) $^ $(LIBS) -L../systems/nagra -lsc-nagra -o $@
+	@echo "don't forget: export LD_LIBRARY_PATH=../systems/nagra"
 
 filterhelper: filterhelper.o
 	$(CXX) $(CXXFLAGS) $^ -o $@
diff --git a/testing/testN2Emu.c b/testing/testN2Emu.c
index 5e85ce6..c2ea053 100644
--- a/testing/testN2Emu.c
+++ b/testing/testN2Emu.c
@@ -136,7 +136,7 @@ bool Ecm(unsigned char *buff, int cmdLen, int id)
   if(ecmP) ecmP->PrintCaps(L_SYS_ECM);
 
   int l=0, mecmAlgo=0;
-  for(int i=16; i<cmdLen-10 && l!=3; ) {
+  for(int i=(buff[14]&0x10)?16:20; i<cmdLen-10 && l!=3; ) {
 printf("%02x: nano %02x\n",i,buff[i]);
     switch(buff[i]) {
       case 0x10:
-- 
2.39.5