projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
81c4e61
)
2003/10/16 18:37:28
author
brian
<brian@xwt.org>
Fri, 30 Jan 2004 07:39:30 +0000
(07:39 +0000)
committer
brian
<brian@xwt.org>
Fri, 30 Jan 2004 07:39:30 +0000
(07:39 +0000)
darcs-hash:
20040130073930
-aa32f-
19fd540d99773caa971debdb724e8c3a4cca5506
.gz
src/org/xwt/js/CompiledFunctionImpl.java
patch
|
blob
|
history
diff --git
a/src/org/xwt/js/CompiledFunctionImpl.java
b/src/org/xwt/js/CompiledFunctionImpl.java
index
f118b76
..
a0c30f7
100644
(file)
--- a/
src/org/xwt/js/CompiledFunctionImpl.java
+++ b/
src/org/xwt/js/CompiledFunctionImpl.java
@@
-378,13
+378,15
@@
class CompiledFunctionImpl extends JS.Callable implements ByteCodes, Tokens {
for(int i=0;i<args.length;i++) d += JS.toDouble(args[i]);
t.push(new Double(d));
} else {
for(int i=0;i<args.length;i++) d += JS.toDouble(args[i]);
t.push(new Double(d));
} else {
- double d=0.0;
int i=0;
int i=0;
- do {
- d += JS.toDouble(args[i++]);
- } while(!(args[i] instanceof String));
StringBuffer sb = new StringBuffer(64);
StringBuffer sb = new StringBuffer(64);
- sb.append(JS.toString(new Double(d)));
+ if(!(args[0] instanceof String || args[1] instanceof String)) {
+ double d=0.0;
+ do {
+ d += JS.toDouble(args[i++]);
+ } while(!(args[i] instanceof String));
+ sb.append(JS.toString(new Double(d)));
+ }
while(i < args.length) sb.append(JS.toString(args[i++]));
t.push(sb.toString());
}
while(i < args.length) sb.append(JS.toString(args[i++]));
t.push(sb.toString());
}