Commit d044585c authored by Tim Zheng's avatar Tim Zheng Committed by Commit Bot

Fix a bug that counts the C string length wrongly.

BUG=chromium:819444
TEST=Manually tested.

Change-Id: If772cc1efaf8105e92fa6bbfa709ee56110dfe90
Reviewed-on: https://chromium-review.googlesource.com/998514Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Tim Zheng <timzheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548557}
parent a1946e63
......@@ -40,5 +40,5 @@ std::string CreateCrostiniAppId(const std::string& window_app_id) {
bool IsCrostiniAppId(const std::string& app_id) {
return strncmp(app_id.c_str(), kCrostiniAppIdPrefix,
sizeof(kCrostiniAppIdPrefix)) == 0;
sizeof(kCrostiniAppIdPrefix) - 1) == 0;
}
......@@ -83,7 +83,7 @@ void CrostiniAppWindowShelfController::OnWindowVisibilityChanged(
// Skip handling ARC++ windows.
if (strncmp(window_app_id->c_str(), kArcAppIdPrefix,
sizeof(kArcAppIdPrefix)) == 0)
sizeof(kArcAppIdPrefix) - 1) == 0)
return;
// Skip when this window has been handled. This can happen when the window
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment