summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/sdl/video.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/sdl/video.h')
-rw-r--r--src/osd/sdl/video.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osd/sdl/video.h b/src/osd/sdl/video.h
index fdda898a891..a8e4e0d4794 100644
--- a/src/osd/sdl/video.h
+++ b/src/osd/sdl/video.h
@@ -70,14 +70,14 @@ public:
sdl_monitor_info(const UINT64 handle, const char *monitor_device, float aspect)
: m_next(NULL), m_handle(handle), m_aspect(aspect)
{
- strncpy(m_name, monitor_device, 64);
+ strncpy(m_name, monitor_device, ARRAY_LENGTH(m_name) - 1);
refresh();
}
const UINT64 handle() { return m_handle; }
const SDL_Rect &position_size() { refresh(); return m_dimensions; }
- const char *devicename() { refresh(); return (m_name != NULL) ? m_name : "UNKNOWN"; }
+ const char *devicename() { refresh(); return m_name[0] ? m_name : "UNKNOWN"; }
float aspect();