Handle NULL SRU addinfo in printing
[yaz-moved-to-github.git] / zoom / zoomsh.c
index 1668367..3bd5fe4 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2007, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: zoomsh.c,v 1.49 2007-09-08 06:17:45 adam Exp $
+ * $Id: zoomsh.c,v 1.50 2007-09-11 15:16:20 adam Exp $
  */
 
 /** \file zoomsh.c
@@ -192,7 +192,7 @@ static void display_records(ZOOM_connection c,
             int error = ZOOM_record_error(rec, &msg, &addinfo, &diagset);
             
             printf("%d %s: %s (%s:%d) %s\n", pos, (db ? db : "unknown"),
-                   msg, diagset, error, addinfo);
+                   msg, diagset, error, addinfo ? addinfo : "none");
         }
         else
         {