From 148c2c20bd43e76cf82e7f7543c687c61302a064 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Thu, 29 Apr 2021 08:53:52 -0700 Subject: [PATCH] test for zero length --- DVAPDongle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DVAPDongle.cpp b/DVAPDongle.cpp index 1edcce4..7df2a80 100644 --- a/DVAPDongle.cpp +++ b/DVAPDongle.cpp @@ -62,13 +62,13 @@ bool CDVAPDongle::Initialize(const char *devpath, const char *serialno, const in { bool ok = false; - if (devpath) + if (strlen(devpath)) { // device path is specified in cfg file, try to open it ok = open_device(devpath); if (! ok) { - fprintf(stderr, "Device %s could not be opened\n", devpath); + fprintf(stderr, "Device '%s' could not be opened\n", devpath); } } else