projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2003/10/16 18:37:28
[org.ibex.core.git]
/
src
/
org
/
xwt
/
js
/
CompiledFunctionImpl.java
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());
}