[PR #1786] Fix G608 output extra NULL character (#1777) #2519

Open
opened 2026-01-29 17:22:34 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/CCExtractor/ccextractor/pull/1786

State: closed
Merged: Yes


Changes Made:

  1. Fixed get_line_encoded() in ccx_encoders_common.c:

    • Changed loop from for (int i = 0; i < 33; i++) to for (int i = 0; i < 32; i++)
    • Was reading 33 characters instead of the specified 32
  2. Fixed get_color_encoded() in ccx_encoders_common.c:

    • Removed *buffer = 0; line that added a NULL terminator
    • This NULL was being written to the output file

Result:
G608 output now correctly contains:

  • 32 characters of text
  • 32 characters of color codes
  • 32 characters of font codes
  • Total: 96 characters per line (no extra NULL bytes)

Fixes #1777

**Original Pull Request:** https://github.com/CCExtractor/ccextractor/pull/1786 **State:** closed **Merged:** Yes --- Changes Made: 1. Fixed `get_line_encoded()` in `ccx_encoders_common.c`: - Changed loop from `for (int i = 0; i < 33; i++)` to `for (int i = 0; i < 32; i++)` - Was reading 33 characters instead of the specified 32 2. Fixed `get_color_encoded()` in `ccx_encoders_common.c`: - Removed `*buffer = 0;` line that added a NULL terminator - This NULL was being written to the output file Result: G608 output now correctly contains: - 32 characters of text - 32 characters of color codes - 32 characters of font codes - Total: 96 characters per line (no extra NULL bytes) Fixes #1777
claunia added the pull-request label 2026-01-29 17:22:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2519