Révision | 93c9f3744a635672bfbe105df676978c2beccc8a (tree) |
---|---|
l'heure | 2021-09-01 19:55:18 |
Auteur | Starg <starg@user...> |
Commiter | Starg |
Merge branch 'dev41' into unicode
@@ -77,21 +77,29 @@ bool CopyTextToClipboard(TStringView text) | ||
77 | 77 | if (hGlobal) |
78 | 78 | { |
79 | 79 | auto p = reinterpret_cast<LPTSTR>(::GlobalLock(hGlobal)); |
80 | - text.copy(p, text.size()); | |
81 | - p[text.size()] = _T('\0'); | |
82 | - ::GlobalUnlock(hGlobal); | |
83 | 80 | |
84 | - ::EmptyClipboard(); | |
81 | + if (p) | |
82 | + { | |
83 | + text.copy(p, text.size()); | |
84 | + p[text.size()] = _T('\0'); | |
85 | + ::GlobalUnlock(hGlobal); | |
86 | + | |
87 | + ::EmptyClipboard(); | |
85 | 88 | |
86 | 89 | #ifdef UNICODE |
87 | - UINT format = CF_UNICODETEXT; | |
90 | + UINT format = CF_UNICODETEXT; | |
88 | 91 | #else |
89 | - UINT format = CF_TEXT; | |
92 | + UINT format = CF_TEXT; | |
90 | 93 | #endif |
91 | 94 | |
92 | - if (::SetClipboardData(format, hGlobal)) | |
93 | - { | |
94 | - ret = true; | |
95 | + if (::SetClipboardData(format, hGlobal)) | |
96 | + { | |
97 | + ret = true; | |
98 | + } | |
99 | + else | |
100 | + { | |
101 | + ::GlobalFree(hGlobal); | |
102 | + } | |
95 | 103 | } |
96 | 104 | else |
97 | 105 | { |
@@ -2514,6 +2514,8 @@ TracerCanvasWndProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam) | ||
2514 | 2514 | NULL |
2515 | 2515 | ); |
2516 | 2516 | |
2517 | + SetWindowPos(w32g_tracer_wnd.hTool, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); | |
2518 | + | |
2517 | 2519 | TTTOOLINFO ti = {0}; |
2518 | 2520 | ti.cbSize = sizeof(ti); |
2519 | 2521 | ti.uFlags = TTF_SUBCLASS; |
@@ -72,11 +72,11 @@ | ||
72 | 72 | |
73 | 73 | # include <sys/types.h> |
74 | 74 | typedef int16_t ogg_int16_t; |
75 | - typedef uint16_t ogg_uint16_t; | |
75 | + typedef u_int16_t ogg_uint16_t; | |
76 | 76 | typedef int32_t ogg_int32_t; |
77 | - typedef uint32_t ogg_uint32_t; | |
77 | + typedef u_int32_t ogg_uint32_t; | |
78 | 78 | typedef int64_t ogg_int64_t; |
79 | - typedef uint64_t ogg_uint64_t; | |
79 | + typedef u_int64_t ogg_uint64_t; | |
80 | 80 | |
81 | 81 | #elif defined(__HAIKU__) |
82 | 82 |
@@ -597,9 +597,14 @@ char *ogg_sync_buffer(ogg_sync_state *oy, long size){ | ||
597 | 597 | |
598 | 598 | if(size>oy->storage-oy->fill){ |
599 | 599 | /* We need to extend the internal buffer */ |
600 | - long newsize=size+oy->fill+4096; /* an extra page to be nice */ | |
600 | + long newsize; | |
601 | 601 | void *ret; |
602 | 602 | |
603 | + if(size>INT_MAX-4096-oy->fill){ | |
604 | + ogg_sync_clear(oy); | |
605 | + return NULL; | |
606 | + } | |
607 | + newsize=size+oy->fill+4096; /* an extra page to be nice */ | |
603 | 608 | if(oy->data) |
604 | 609 | ret=_ogg_realloc(oy->data,newsize); |
605 | 610 | else |
@@ -1564,7 +1569,7 @@ void test_pack(const int *pl, const int **headers, int byteskip, | ||
1564 | 1569 | byteskipcount=byteskip; |
1565 | 1570 | } |
1566 | 1571 | |
1567 | - ogg_sync_wrote(&oy,next-buf); | |
1572 | + ogg_sync_wrote(&oy,(long)(next-buf)); | |
1568 | 1573 | |
1569 | 1574 | while(1){ |
1570 | 1575 | int ret=ogg_sync_pageout(&oy,&og_de); |
@@ -4099,7 +4099,7 @@ static void sample_filter_LPF24_batch(int batch_size, FILTER_T **dcs, FILTER_T * | ||
4099 | 4099 | _mm_castsi128_pd(_mm_unpackhi_epi32(vmask32, vmask32)), |
4100 | 4100 | 1 |
4101 | 4101 | ); |
4102 | - vdas[0] = _mm256_sub_pd(vsps[k], _mm256_mul_pd(vdc2, vdb4)); | |
4102 | + vdas[0] = _mm256_sub_pd(vsps[k], _mm256_mul_pd(vdc[2], vdb[4])); | |
4103 | 4103 | #endif |
4104 | 4104 | |
4105 | 4105 | vdas[1] = vdb[1]; |