r648: no message
[ctsim.git] / libctsim / procsignal.cpp
index d6701ca41ae9aabacd8a638f4752189a76287ec9..1685f191857147033fa92fc0acbdab778f2cfbf4 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: procsignal.cpp,v 1.31 2001/03/29 21:25:49 kevin Exp $
+**  $Id: procsignal.cpp,v 1.32 2001/03/30 19:17:32 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -871,9 +871,11 @@ ProcessSignal::addZeropadFactor (int n, int iZeropad)
   if (iZeropad > 0) {
     double dLogBase2 = log(n) / log(2);
     int iLogBase2 = static_cast<int>(floor (dLogBase2));
-    if (dLogBase2 != floor(dLogBase2))
-      iLogBase2++;   // raise up to next power of 2
-    n = 1 << (iLogBase2 + (iZeropad - 1));
+    int iPaddedN = 1 << (iLogBase2 + iZeropad);
+#ifdef DEBUG
+    sys_error (ERR_TRACE, "Zeropadding %d to %d", n, iPaddedN);
+#endif
+    return iPaddedN;
   }
 
   return n;