IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7021


Ignore:
Timestamp:
May 1, 2006, 11:23:15 AM (20 years ago)
Author:
Paul Price
Message:

Fixing bug in psArgumentHelp caused when default value (type S32) was
zero --- infinite number of spaces produced.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psArguments.c

    r6187 r7021  
    77 *  @author David Robbins, MHPCC
    88 *
    9  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2006-01-23 23:52:15 $
     9 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2006-05-01 21:23:15 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    300300        // Only doing a representative set of types
    301301    case PS_DATA_S32:
    302         return arg->data.S32 >= 0 ? (int)log10f((float)arg->data.S32) + 1 :
    303                (int)log10f(-(float)arg->data.S32) + 2;
     302        return arg->data.S32 == 0 ? 1 :
     303               (arg->data.S32 > 0 ? (int)log10f((float)arg->data.S32) + 1 :
     304                (int)log10f(-(float)arg->data.S32) + 2);
    304305        // XXX: Other numerical types
    305306    case PS_DATA_F32:
Note: See TracChangeset for help on using the changeset viewer.