aboutsummaryrefslogtreecommitdiff
path: root/libjava/jni.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/jni.cc')
-rw-r--r--libjava/jni.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libjava/jni.cc b/libjava/jni.cc
index be79ba9..a4a12a8 100644
--- a/libjava/jni.cc
+++ b/libjava/jni.cc
@@ -1612,7 +1612,10 @@ add_char (char *buf, jchar c, int *here)
buf[(*here)++] = '_';
buf[(*here)++] = '3';
}
- else if (c == '/')
+
+ // Also check for `.' here because we might be passed an internal
+ // qualified class name like `foo.bar'.
+ else if (c == '/' || c == '.')
buf[(*here)++] = '_';
else if ((c >= '0' && c <= '9')
|| (c >= 'a' && c <= 'z')