mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 11:32:48 -05:00
Fix 'Duplicate Session' on Windows, broken during the config revamp.
(In an embarrassingly silly way, too. No end of difficult stuff about Conf serialisation done with great care and working just fine, and then a trivial goof in using sscanf lets the whole lot down.) [originally from svn r9237]
This commit is contained in:
@ -445,7 +445,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
|||||||
HANDLE filemap;
|
HANDLE filemap;
|
||||||
void *cp;
|
void *cp;
|
||||||
unsigned cpsize;
|
unsigned cpsize;
|
||||||
if (sscanf(p + 1, "%p:%u", &filemap, &cpsize) == 1 &&
|
if (sscanf(p + 1, "%p:%u", &filemap, &cpsize) == 2 &&
|
||||||
(cp = MapViewOfFile(filemap, FILE_MAP_READ,
|
(cp = MapViewOfFile(filemap, FILE_MAP_READ,
|
||||||
0, 0, cpsize)) != NULL) {
|
0, 0, cpsize)) != NULL) {
|
||||||
conf_deserialise(conf, cp, cpsize);
|
conf_deserialise(conf, cp, cpsize);
|
||||||
|
Reference in New Issue
Block a user