From e791e11d4ece94e3b41271edb3903a9f6fb6322a Mon Sep 17 00:00:00 2001 From: binaryduke <41908989+binaryduke@users.noreply.github.com> Date: Wed, 15 Jul 2026 11:59:50 +0100 Subject: [PATCH] fix(generator): cast frame.LEN in min() so WS read compiles under MSVC generator.h WebSocket frame read calls min( sx, frame.LEN ), mixing ulong (sx) and uchar_64 (frame.LEN). With the namespaced min from #32, template argument deduction fails on this mismatch under MSVC 2022 (/std:c++20), so the WebSocket translation unit does not build on Windows. One-line cast resolves it, matching the existing cast style at other min() call sites in this file. Verified: dev builds clean on MSVC 2022 x64 /std:c++20 /MT and the #36 WebSocket connect path runs. --- include/nodepp/generator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nodepp/generator.h b/include/nodepp/generator.h index 75dff098..544d531f 100755 --- a/include/nodepp/generator.h +++ b/include/nodepp/generator.h @@ -765,7 +765,7 @@ namespace nodepp { namespace generator { namespace ws { coYield(1); len=0; - while ( frame.LEN > 0 ){ sz = min( sx, frame.LEN ); + while ( frame.LEN > 0 ){ sz = min( sx, (ulong) frame.LEN ); coWait( str->_read_( bf, sz, &len )==-2 ); if( frame.MSK ){ for( ulong x=0; x