[Webfunds-commits] java/webfunds/client/sox/gui PaymentFrame.java
Ian Grigg
iang@cypherpunks.ai
Wed, 21 Feb 2001 16:44:46 -0400 (AST)
iang 01/02/21 16:44:46
Modified: webfunds/client SimplePaymentFrame.java
webfunds/client/sox/gui PaymentFrame.java
Log:
fixed embarressing lack of check for negative payments....
Revision Changes Path
1.46 +9 -1 java/webfunds/client/SimplePaymentFrame.java
Index: SimplePaymentFrame.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/SimplePaymentFrame.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- SimplePaymentFrame.java 2000/09/24 23:15:12 1.45
+++ SimplePaymentFrame.java 2001/02/21 20:44:45 1.46
@@ -1,5 +1,5 @@
/*
- * $Id: SimplePaymentFrame.java,v 1.45 2000/09/24 23:15:12 iang Exp $
+ * $Id: SimplePaymentFrame.java,v 1.46 2001/02/21 20:44:45 iang Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -327,6 +327,14 @@
pm.getUInterface(this).errorMessage(e);
return ;
}
+
+ if (dub < 0)
+ {
+ String e = "Negative amounts are not possible.";
+ pm.getUInterface(this).errorMessage(e);
+ return ;
+ }
+
long longamount = contract.getUnitsOfContract(dub);;
// who to
1.4 +9 -1 java/webfunds/client/sox/gui/PaymentFrame.java
Index: PaymentFrame.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/sox/gui/PaymentFrame.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PaymentFrame.java 2000/12/18 04:19:11 1.3
+++ PaymentFrame.java 2001/02/21 20:44:45 1.4
@@ -1,5 +1,5 @@
/*
- * $Id: PaymentFrame.java,v 1.3 2000/12/18 04:19:11 iang Exp $
+ * $Id: PaymentFrame.java,v 1.4 2001/02/21 20:44:45 iang Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -341,6 +341,14 @@
pm.getUInterface(this).errorMessage(e);
return ;
}
+
+ if (dub < 0)
+ {
+ String e = "Negative amounts are not possible.";
+ pm.getUInterface(this).errorMessage(e);
+ return ;
+ }
+
long longamount = contract.getUnitsOfContract(dub);
//