Fix typo that caused a too small buffer to be allocated for device names.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25465 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -329,7 +329,7 @@ publish_devices()
|
||||
acquire_sem(gDriverLock);
|
||||
for(int32 i = 0; i < DEVICES_COUNT; i++) {
|
||||
if (gSerialDevices[i]) {
|
||||
gDeviceNames[j] = (char *)malloc(strlen(sDeviceBaseName + 4));
|
||||
gDeviceNames[j] = (char *)malloc(strlen(sDeviceBaseName) + 4);
|
||||
if (gDeviceNames[j]) {
|
||||
sprintf(gDeviceNames[j], "%s%ld", sDeviceBaseName, i);
|
||||
j++;
|
||||
|
||||
Reference in New Issue
Block a user