]> www.vanbest.org Git - sasc-ng.git/commitdiff
nagra: fix a signed-unsigned clash
authorleslie <unknown>
Thu, 10 Jan 2008 18:48:04 +0000 (19:48 +0100)
committerleslie <unknown>
Thu, 10 Jan 2008 18:48:04 +0000 (19:48 +0100)
systems/nagra/nagra2-0101.c
systems/nagra/nagra2.c
systems/nagra/nagra2.h

index 2362a2e42534e4b20b0a10b5b0656e24bee3f062..207caaf85162216f4673b05b976a1c07e9c088af 100644 (file)
@@ -467,8 +467,8 @@ void cMap0101::DoMap(int f, unsigned char *data, int l)
       break;
     case 0x57:
 #ifdef HAS_AUXSRV
-      cycles=aux.Map(0x57,data,0x60,0x40);
-      if(cycles>0) { cycles-=6; break; }
+      int c=aux.Map(0x57,data,0x60,0x40);
+      if(c>0) { cycles=c-6; break; }
 #endif
       {
       cBN a, b, x, y, scalar;
index 0af986703d12c6c61d804f84793a57c1a4f5734e..425da390336589e1044b25355af845b5c45a833a 100644 (file)
@@ -37,7 +37,7 @@ cN2Timer::cN2Timer(void)
   cycles=0; ctrl=0; divisor=1; remainder=-1; latch=0xFF;
 }
 
-void cN2Timer::AddCycles(int count)
+void cN2Timer::AddCycles(unsigned int count)
 {
   if(Running()) {
     remainder+=count;
index 50fa76e851680845ebd09b0d90eae8cd619138e7..d4de24d89adf0dfd55eb0e3452c09d744cac63cc 100644 (file)
@@ -59,8 +59,8 @@ private:
   void Stop(void);
 public:
   cN2Timer(void);
-  void AddCycles(int count);
-  unsigned int Cycles(void) { return (unsigned int)cycles; }
+  void AddCycles(unsigned int count);
+  unsigned int Cycles(void) { return cycles; }
   unsigned char Ctrl(void) { return ctrl&tmMASK; }
   void Ctrl(unsigned char c);
   unsigned char Latch(void) { return latch&0xFF; }