diff options
Diffstat (limited to 'net_ntrip.c')
-rw-r--r-- | net_ntrip.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net_ntrip.c b/net_ntrip.c index 27b1de15..bcdc1dfb 100644 --- a/net_ntrip.c +++ b/net_ntrip.c @@ -488,9 +488,10 @@ int ntrip_open(struct gps_device_t *device, char *caster) (void)strlcpy(device->ntrip.stream.mountpoint, stream, sizeof(device->ntrip.stream.mountpoint)); - (void)strlcpy(device->ntrip.stream.credentials, - auth, - sizeof(device->ntrip.stream.credentials)); + if (auth != NULL) + (void)strlcpy(device->ntrip.stream.credentials, + auth, + sizeof(device->ntrip.stream.credentials)); (void)strlcpy(device->ntrip.stream.url, url, sizeof(device->ntrip.stream.url)); |