BString:UnlockBuffer expects the length without the null-terminator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35872 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -501,7 +501,6 @@ LegacyBootDrive::GetDisplayText(const char* text, BString& displayText)
|
||||
}
|
||||
|
||||
buffer[bufferLength] = '\0';
|
||||
bufferLength ++;
|
||||
displayText.UnlockBuffer(bufferLength);
|
||||
return B_OK;
|
||||
}
|
||||
@@ -528,7 +527,6 @@ LegacyBootDrive::_ConvertToBIOSText(const char* text, BString& biosText)
|
||||
}
|
||||
|
||||
buffer[biosTextLength] = '\0';
|
||||
biosTextLength ++;
|
||||
biosText.UnlockBuffer(biosTextLength);
|
||||
return biosTextLength <= kMaxBootMenuItemLength;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user