| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -861,6 +861,10 @@ def pack_ext_type(self, typecode, data): | |
| self._buffer.write(b"\xc9" + struct.pack(">I", L)) | ||
| self._buffer.write(struct.pack("B", typecode)) | ||
| self._buffer.write(data) | ||
| if self._autoreset: | ||
| ret = self._buffer.getvalue() | ||
| self._buffer = BytesIO() | ||
| return ret | ||
|
Comment thread
Comment on lines
+864
to
+867
|
||
|
|
||
| def _pack_array_header(self, n): | ||
| if n <= 0x0F: | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityPlease add a regression test that asserts Packer().pack_ext_type(...) returns the packed bytes when autoreset is enabled, and that the internal buffer is cleared (e.g., a subsequent packer.pack(99) should not include the previously packed ext bytes). This would have caught the original bug and will prevent it from reappearing.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality@copilot apply changes based on this feedback
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.