Fix another oversight of r41500. The size check was using sizeof(char *) instead
of bufferSize, corrupting entries when multiple items within the same menu were checked. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41505 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
192bc027ea
commit
e64bb27712
@ -849,7 +849,7 @@ apply_safe_mode_options(Menu* menu, char *buffer, size_t bufferSize)
|
||||
|
||||
size_t totalBytes = snprintf(buffer + pos, bufferSize - pos,
|
||||
"%s true\n", (const char*)item->Data());
|
||||
pos += std::min(totalBytes, sizeof(buffer) - pos - 1);
|
||||
pos += std::min(totalBytes, bufferSize - pos - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user