Skip to content

fix(partners): avoid hang in split_message when max_len <= 0#644

Merged
pancacake merged 1 commit into
HKUDS:devfrom
santhreal:fix/split-message-nonpositive-maxlen-dev
Jul 23, 2026
Merged

fix(partners): avoid hang in split_message when max_len <= 0#644
pancacake merged 1 commit into
HKUDS:devfrom
santhreal:fix/split-message-nonpositive-maxlen-dev

Conversation

@santhreal

Copy link
Copy Markdown
Contributor

When max_len is 0 or negative, the cut pointer never advances and split_message loops forever. Return the content unsplit so Discord/Telegram/Weixin outbound paths cannot wedge.

Repro: split_message("hello world", max_len=0).

When max_len is 0 or negative, the cut pointer never advances and split_message loops forever.
Return the content unsplit, matching the nanobot helpers pattern.
@pancacake

Copy link
Copy Markdown
Collaborator

Thanks for your contribution!

@pancacake
pancacake merged commit ed07812 into HKUDS:dev Jul 23, 2026
vaskoyudha added a commit to vaskoyudha/deeptutor-for-programmer-fork that referenced this pull request Jul 25, 2026
…tive-maxlen-dev

fix(partners): avoid hang in split_message when max_len <= 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants