Skip to content

Commit

Permalink
Create 001-switch-buffer.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lazedo authored Feb 1, 2018
1 parent 9036aa1 commit 236c39a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 001-switch-buffer.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/switch_buffer.c b/src/switch_buffer.c
index 58e5244..95b49ee 100644
--- a/src/switch_buffer.c
+++ b/src/switch_buffer.c
@@ -297,7 +297,7 @@
switch_assert(buffer->data != NULL);

if (!datalen) {
- return buffer->used;
+ return buffer->used ? buffer->used : 1;
}

actual_freespace = buffer->datalen - buffer->actually_used;

0 comments on commit 236c39a

Please sign in to comment.