We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 758ca8d commit 2bd850bCopy full SHA for 2bd850b
src/node_i18n.cc
@@ -586,7 +586,9 @@ static void GetStringWidth(const FunctionCallbackInfo<Value>& args) {
586
TwoByteValue value(env->isolate(), args[0]);
587
// reinterpret_cast is required by windows to compile
588
UChar* str = reinterpret_cast<UChar*>(*value);
589
- UChar32 c;
+ static_assert(sizeof(*str) == sizeof(**value),
590
+ "sizeof(*str) == sizeof(**value)");
591
+ UChar32 c = 0;
592
UChar32 p;
593
size_t n = 0;
594
uint32_t width = 0;
0 commit comments