diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-08 20:14:10 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-08 20:14:10 -0400 |
| commit | 47723aa8d9605a09ee119dfc14fda4148413cc20 (patch) | |
| tree | 85cf54671c391b5813f66dcf437dcad7761d9884 /new/util_windows.c | |
| parent | 7d349d6a2843c6e0825403448ac28683e688f338 (diff) | |
More TODO resolution.
Diffstat (limited to 'new/util_windows.c')
| -rw-r--r-- | new/util_windows.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/new/util_windows.c b/new/util_windows.c index 4f883b9..5034dae 100644 --- a/new/util_windows.c +++ b/new/util_windows.c @@ -17,7 +17,6 @@ WCHAR *toUTF16(const char *str) return wstr; } -// TODO this and resize(): initialize size and other values to avoid garbage on failure intmax_t uiWindowsWindowTextWidth(HWND hwnd) { int len; @@ -26,6 +25,8 @@ intmax_t uiWindowsWindowTextWidth(HWND hwnd) HFONT prevfont; SIZE size; + size.cx = 0; + size.cy = 0; // TODO check for error len = GetWindowTextLengthW(hwnd); if (len == 0) // no text; nothing to do |
