projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move the reference to sitestyle.css out into a separate .but file
[u/mdw/putty]
/
noise.c
diff --git
a/noise.c
b/noise.c
index
856974b
..
00719bb
100644
(file)
--- a/
noise.c
+++ b/
noise.c
@@
-3,7
+3,6
@@
* generator.
*/
* generator.
*/
-#include <windows.h>
#include <stdio.h>
#include "putty.h"
#include <stdio.h>
#include "putty.h"
@@
-40,6
+39,8
@@
void noise_get_heavy(void (*func) (void *, int))
}
read_random_seed(func);
}
read_random_seed(func);
+ /* Update the seed immediately, in case another instance uses it. */
+ random_save_seed();
gsps = NULL;
mod = GetModuleHandle("KERNEL32");
gsps = NULL;
mod = GetModuleHandle("KERNEL32");
@@
-53,8
+54,11
@@
void random_save_seed(void)
int len;
void *data;
int len;
void *data;
- random_get_savedata(&data, &len);
- write_random_seed(data, len);
+ if (random_active) {
+ random_get_savedata(&data, &len);
+ write_random_seed(data, len);
+ sfree(data);
+ }
}
/*
}
/*
@@
-127,7
+131,7
@@
void noise_regular(void)
* counter to the noise pool. It gets the scan code or mouse
* position passed in.
*/
* counter to the noise pool. It gets the scan code or mouse
* position passed in.
*/
-void noise_ultralight(
DWORD
data)
+void noise_ultralight(
unsigned long
data)
{
DWORD wintime;
LARGE_INTEGER perftime;
{
DWORD wintime;
LARGE_INTEGER perftime;