Bug fixes:
* make sure we never have an invalid startIndex in PwGroup.SearchEvalAdd * make sure AndroidContentStorage does never throw (not if permission denial exception occurs) and make sure we always return a reason for read-only. Also don't return read-only when it's not. * StopListening doesn't log Invalid State Exception as unexpected
This commit is contained in:
@@ -990,7 +990,7 @@ namespace KeePassLib
|
||||
if (contextString.Length > SearchContextStringMaxLength)
|
||||
{
|
||||
// Start 10% before actual data, and don't run over
|
||||
var startPos = Math.Min(matchPos - (SearchContextStringMaxLength / 10), contextString.Length - SearchContextStringMaxLength);
|
||||
var startPos = Math.Max(0, Math.Min(matchPos - (SearchContextStringMaxLength / 10), contextString.Length - SearchContextStringMaxLength));
|
||||
contextString = "<22> " + contextString.Substring(startPos, SearchContextStringMaxLength) + ((startPos + SearchContextStringMaxLength < contextString.Length) ? " <20>" : null);
|
||||
}
|
||||
resultContexts[pe.Uuid] = new KeyValuePair<string, string>(contextFieldName, contextString);
|
||||
|
||||
Reference in New Issue
Block a user