finnp / finnp/cpio-stream

newc dev field cant be 0

Open Beginner friendly
#12 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13
Forks
8
PR merge metrics
No merged PRs in 30d

Description

in the packer, if dev (or a number of others) are nullish, including 0 because js Is js, then it sets them to defaults. the default for dev is not 0, it is 777777 octal, which means you cannot set dev to 0.
suggested fix: either make the default 0, or exclude 0 from the override by using "this = this ?? that" instead of "if (!this) this = that" in pack.js.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in pack.js and inspect how nullish packer fields are replaced with defaults. Ensure an explicit dev value of 0 is preserved rather than treated as missing, then verify that packing with dev set to 0 produces the requested value instead of the default.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.