Keepass lib 2.35

This commit is contained in:
Philipp Crocoll
2017-01-11 07:57:01 +01:00
parent a2f2e3d6f8
commit 26c0fde41c
100 changed files with 1494 additions and 617 deletions

View File

@@ -1,6 +1,6 @@
/*
KeePass Password Safe - The Open-Source Password Manager
Copyright (C) 2003-2016 Dominik Reichl <dominik.reichl@t-online.de>
Copyright (C) 2003-2017 Dominik Reichl <dominik.reichl@t-online.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -669,7 +669,8 @@ namespace KeePassLib.Utility
return DateTime.TryParse(str, out dt);
#else
try { dt = DateTime.Parse(str); return true; }
catch(Exception) { dt = DateTime.MinValue; return false; }
catch(Exception) { dt = DateTime.UtcNow; }
return false;
#endif
}
@@ -1732,5 +1733,16 @@ namespace KeePassLib.Utility
return iCount;
}
internal static string ReplaceNulls(string str)
{
if(str == null) { Debug.Assert(false); return null; }
if(str.IndexOf('\0') < 0) return str;
// Replacing null characters by spaces is the
// behavior of Notepad (on Windows 10)
return str.Replace('\0', ' ');
}
}
}