mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-06 05:52:48 -05:00
Rewrite conf deserialisation using BinarySource.
Like the corresponding rewrite of conf serialisation, this affects not just conf_deserialise itself but also the per-platform filename and fontspec deserialisers.
This commit is contained in:
@ -480,7 +480,10 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
||||
if (sscanf(p + 1, "%p:%u", &filemap, &cpsize) == 2 &&
|
||||
(cp = MapViewOfFile(filemap, FILE_MAP_READ,
|
||||
0, 0, cpsize)) != NULL) {
|
||||
conf_deserialise(conf, cp, cpsize);
|
||||
BinarySource src[1];
|
||||
BinarySource_BARE_INIT(src, cp, cpsize);
|
||||
if (!conf_deserialise(conf, src))
|
||||
modalfatalbox("Serialised configuration data was invalid");
|
||||
UnmapViewOfFile(cp);
|
||||
CloseHandle(filemap);
|
||||
} else if (!do_config()) {
|
||||
|
Reference in New Issue
Block a user