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

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

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1786
Author: @DhanushVarma-2
Created: 12/8/2025
Status: Merged
Merged: 12/9/2025
Merged by: @cfsmp3

Base: masterHead: fresh-g608-fix


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -2 deletions)

View changed files

📝 src/lib_ccx/ccx_encoders_common.c (+1 -2)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/1786 **Author:** [@DhanushVarma-2](https://github.com/DhanushVarma-2) **Created:** 12/8/2025 **Status:** ✅ Merged **Merged:** 12/9/2025 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `fresh-g608-fix` --- ### 📝 Commits (1) - [`592018e`](https://github.com/CCExtractor/ccextractor/commit/592018e3c5d259dde1a6d060fca5adcf8d020dd8) Fix G608 output extra NULL character (#1777) ### 📊 Changes **1 file changed** (+1 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/lib_ccx/ccx_encoders_common.c` (+1 -2) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:22:33 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2515