Browse Source

LibJS: Fix uninitialized member variable in DurationFormat

Reported-by: PVS Studio
Brian Gianforcaro 2 years ago
parent
commit
bffc29ae34
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.h

+ 1 - 1
Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.h

@@ -163,7 +163,7 @@ private:
     DeprecatedString m_locale;                            // [[Locale]]
     DeprecatedString m_data_locale;                       // [[DataLocale]]
     DeprecatedString m_numbering_system;                  // [[NumberingSystem]]
-    Style m_style;                                        // [[Style]]
+    Style m_style { Style::Long };                        // [[Style]]
     ValueStyle m_years_style { ValueStyle::Long };        // [[YearsStyle]]
     Display m_years_display { Display::Auto };            // [[YearsDisplay]]
     ValueStyle m_months_style { ValueStyle::Long };       // [[MonthsStyle]]