mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-22 12:04:38 +00:00
Bug 956716 - Use exclusive bounds for substring. r=bnicholson
This commit is contained in:
parent
2a40007161
commit
82f160e5f7
@ -104,7 +104,7 @@ public class Prompt implements OnClickListener, OnCancelListener, OnItemClickLis
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
|
||||
if (!TextUtils.isEmpty(title)) {
|
||||
// Long strings can delay showing the dialog, so we cap the number of characters shown to 256.
|
||||
builder.setTitle(title.substring(0, Math.min(title.length(), 256) - 1));
|
||||
builder.setTitle(title.substring(0, Math.min(title.length(), 256)));
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(text)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user