openalbridge/wrappers.c
changeset 2419 dbaaba09146d
parent 2418 538a777f90c4
child 2443 fececcbc2189
--- a/openalbridge/wrappers.c	Sun Oct 11 20:14:55 2009 +0000
+++ b/openalbridge/wrappers.c	Sun Oct 11 20:25:24 2009 +0000
@@ -51,6 +51,7 @@
                 fp = fopen(fname,mode);
                 if (fp == NULL)
                         err_ret("(%s) ERROR - can't open file %s in mode '%s'", prog, fname, mode);
+                
                 return fp;
         }
         
@@ -71,8 +72,8 @@
                 
                 error = alGetError();
                 if (error != AL_NO_ERROR) {
-                        fprintf(stderr, str, error, num);
-                        return -2;
+                        err_msg(str, prog, num);
+                        return error;
                 } else 
                         return AL_TRUE;
         }