Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new SerializeAs option for TerminatedSizedString. #214

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 20, 2023

  1. Add new SerializeAs option for TerminatedSizedString.

    This allows to keep the existing TerminatedString behaviour when a field
    length constraint is applied, where it essentially becomes a SizedString.
    Whilst also allowing new behaviour that would keep the terminated string
    aspect, but truncate / pad the terminated string around the length constraint
    
    Test case shows non-standard terminator (\n or 0x0A), and non-standard
    padding byte 0x0D just to prove that these work as expected also.
    
    Possibly fixes jefffhaynes#171 (confirmation required)
    
    Signed-off-by: Bevan Weiss <[email protected]>
    bevanweiss committed May 20, 2023
    Configuration menu
    Copy the full SHA
    cb1369c View commit details
    Browse the repository at this point in the history