summaryrefslogtreecommitdiff
path: root/map65/pa_get_device_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'map65/pa_get_device_info.c')
-rw-r--r--map65/pa_get_device_info.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/map65/pa_get_device_info.c b/map65/pa_get_device_info.c
index 968d3434..934ddc94 100644
--- a/map65/pa_get_device_info.c
+++ b/map65/pa_get_device_info.c
@@ -53,9 +53,16 @@ int pa_get_device_info (int n,
if(n >= Pa_GetDeviceCount() ) return -1;
deviceInfo = Pa_GetDeviceInfo(n);
if (deviceInfo->maxInputChannels==0) return -1;
- sprintf((char*)(pa_device_name),"%s",deviceInfo->name);
- sprintf((char*)(pa_device_hostapi),"%s",
- Pa_GetHostApiInfo( deviceInfo->hostApi )->name);
+ snprintf((char*)pa_device_name,
+ 128,
+ "%.127s",
+ deviceInfo->name);
+
+snprintf((char*)pa_device_hostapi,
+ 128,
+ "%.127s",
+ Pa_GetHostApiInfo(deviceInfo->hostApi)->name);
+
speed_warning=0;
// bypass bug in Juli@ ASIO driver: