#109 validate values before they are compared

Version 5.6
closed-fixed
7
2012-05-01
2010-01-28
No

In the EntityComparator methods used to compare datatypes, the string values defValue and scValue should be validated to make sure that their values align with their datatypes. For example, in the EntityComparator::CompareFloat() method if the values "abc" and "5.0" are passed to this method with the 'greater than' operation the result will be 'false' when it should really result in an error as the comparison of 'abc' > '5' does not make sense. However, this currently results in 'false' because when atof is used to convert 'abc' it returns 0 because the value could not successfully be converted to a float and when the comparison '0' > '5' is performed it evaluates to 'false'.

Discussion

  • Jonathan Baker

    Jonathan Baker - 2010-08-26
    • priority: 2 --> 6
     
  • Jonathan Baker

    Jonathan Baker - 2010-09-30
    • assigned_to: nobody --> natprz
     
  • Jonathan Baker

    Jonathan Baker - 2011-01-18
    • priority: 6 --> 7
     
  • Jonathan Baker

    Jonathan Baker - 2011-01-18
    • assigned_to: natprz --> nobody
     
  • Danny Haynes

    Danny Haynes - 2011-10-13
    • assigned_to: nobody --> rothenberg
     
  • David Rothenberg

    Updated to implement regular expressions to confirm the datatype format. Fixed in revision 1237.

     
  • David Rothenberg

    • status: open --> open-fixed
     
  • David Rothenberg

    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks