summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-08-29 19:03:52 +0000
committerKenneth Russel <[email protected]>2008-08-29 19:03:52 +0000
commit80672213c63260d1016c0673c6e1e8e07524322b (patch)
tree0b2346242f28384c2df0089dfa71bae66d404f35 /src
parentb000a15b12b0e2eadd567ef6e2ac98edf246f485 (diff)
Fixed bug in printing of floating point constants that already end with "f"
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/JOGL_2_SANDBOX@113 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src')
-rw-r--r--src/java/com/sun/gluegen/JavaEmitter.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/java/com/sun/gluegen/JavaEmitter.java b/src/java/com/sun/gluegen/JavaEmitter.java
index 60daf89..2588158 100644
--- a/src/java/com/sun/gluegen/JavaEmitter.java
+++ b/src/java/com/sun/gluegen/JavaEmitter.java
@@ -281,7 +281,10 @@ public class JavaEmitter implements GlueEmitter {
if (optionalComment != null && optionalComment.length() != 0) {
javaWriter().println(" /** " + optionalComment + " */");
}
- String suffix = (type.equals("float") ? "f" : "");
+ String suffix = "";
+ if (type.equals("float") && !value.endsWith("f")) {
+ suffix = "f";
+ }
javaWriter().println(" public static final " + type + " " + name + " = " + value + suffix + ";");
}
}