@@ -207,7 +207,7 @@ std::string WiresharkIntField::wiresharkDissectBodyImpl(const WiresharkField* re
207207
208208 auto & wiresharkGenerator = WiresharkGenerator::wiresharkCast (genGenerator ());
209209 auto parseObj = genIntFieldParseObj ();
210- bool hasVal = !wiresharkHasTrivialValidImpl ();
210+ bool hasVal = ( !wiresharkHasTrivialValidImpl ()) || parseObj. parseIsPseudo ();
211211 util::GenReplacementMap repl = {
212212 {" LEN" , std::to_string (wiresharkMinFieldLength (refField))},
213213 {" SUCCESS" , Wireshark::wiresharkStatusCodeStr (wiresharkGenerator, Wireshark::WiresharkStatusCode::Success)},
@@ -467,6 +467,20 @@ std::string WiresharkIntField::wiresharkFieldAsFloatRegistrationInternal(const W
467467std::string WiresharkIntField::wiresharkValDeclCodeInternal () const
468468{
469469 auto parseObj = genIntFieldParseObj ();
470+
471+ if (parseObj.parseIsPseudo ()) {
472+ static const std::string Templ =
473+ " local #^#VAL#$# = #^#VALUE#$#\n "
474+ ;
475+
476+ util::GenReplacementMap repl = {
477+ {" VAL" , wiresharkValStr ()},
478+ {" VALUE" , std::to_string (parseObj.parseDefaultValue ())},
479+ };
480+
481+ return util::genProcessTemplate (Templ, repl);
482+ }
483+
470484 auto type = parseObj.parseType ();
471485 if (genIsVarLengthType (type)) {
472486 static const std::string Templ =
0 commit comments