summaryrefslogtreecommitdiff
path: root/plot/vrml.c
diff options
context:
space:
mode:
Diffstat (limited to 'plot/vrml.c')
-rwxr-xr-x[-rw-r--r--]plot/vrml.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/plot/vrml.c b/plot/vrml.c
index b077cdb..5b3f9a1 100644..100755
--- a/plot/vrml.c
+++ b/plot/vrml.c
@@ -1314,8 +1314,10 @@ static void check_format() {
/* Return the global format file extension */
static char *ret_ext(vrml_fmt fmt) {
- if (fmt == fmt_uninit)
+ if (fmt == fmt_uninit) {
check_format();
+ fmt = g_fmt;
+ }
if (fmt == fmt_x3dom)
return ".x3d.html";
@@ -1327,8 +1329,10 @@ static char *ret_ext(vrml_fmt fmt) {
/* Return the global format type name */
static char *ret_format(vrml_fmt fmt) {
- if (fmt == fmt_uninit)
+ if (fmt == fmt_uninit) {
check_format();
+ fmt = g_fmt;
+ }
if (fmt == fmt_x3dom)
return "X3DOM";