From 62c65a7fb261aa7b647baea4e41b77db4ddc911b Mon Sep 17 00:00:00 2001 From: Ryan Leavengood Date: Thu, 19 Jul 2007 01:16:23 +0000 Subject: [PATCH] Use constant for length of file suggested by Ioan Molnar. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21651 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/joysticks/JoyWin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preferences/joysticks/JoyWin.cpp b/src/preferences/joysticks/JoyWin.cpp index 2b5ad8803d..5c96f9b919 100644 --- a/src/preferences/joysticks/JoyWin.cpp +++ b/src/preferences/joysticks/JoyWin.cpp @@ -132,13 +132,13 @@ bool JoyWin::QuitRequested() /* Initialization */ status_t JoyWin::AddDevices() { - char buf[256]; + char buf[BEOS_NAME_LENGTH]; int devId = 0; MessagedItem* device; BMessage* message; BString str; - while (!fJoystick.GetDeviceName(devId, buf, 256)) { + while (!fJoystick.GetDeviceName(devId, buf, BEOS_NAME_LENGTH)) { message = new BMessage(PORT_SELECTED); message->AddString("devname", buf); // NOTE: Adding the index in the list might be useful.