summaryrefslogtreecommitdiff
path: root/lib/comm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/comm.c')
-rw-r--r--lib/comm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/comm.c b/lib/comm.c
index 0ddc349..6f38ef4 100644
--- a/lib/comm.c
+++ b/lib/comm.c
@@ -188,7 +188,9 @@ void dapi_close( DapiConnection* conn )
static int getNextSeq( DapiConnection* conn )
{
- return ++conn->last_seq;
+ if( ++conn->last_seq == 0 ) // 0 means invalid
+ ++conn->last_seq;
+ return conn->last_seq;
}
static char* readString( DapiConnection* conn, int len )