diff --git a/xpcom/typelib/xpidl/xpidl_java.c b/xpcom/typelib/xpidl/xpidl_java.c index 1a49d8af0b2..e36f53cea5d 100644 --- a/xpcom/typelib/xpidl/xpidl_java.c +++ b/xpcom/typelib/xpidl/xpidl_java.c @@ -290,6 +290,9 @@ interface_declaration(TreeState *state) strncpy(outname, state->filename, p + 1 - state->filename); outname[p + 1 - state->filename] = '\0'; } + else { + outname[0] = '\0'; + } strcat(outname, interface_name); strcat(outname, ".java");