You already asked this question, and I already answered it here. Zero is an expected byte in your coding scheme, and must not be rejected. Simply delete the if (c <= 0)
section.
More Related Contents:
- How I can correct my c code?
- Printing hexadecimal characters in C
- Locks around memory manipulation via inline assembly
- What is a bus error? Is it different from a segmentation fault?
- What can be the reasons of connection refused errors?
- C Minishell Adding Pipelines
- What does space in scanf mean? [duplicate]
- Implicit int return value of C function
- Passing an array by reference in C?
- Returning a C string from a function
- When and why to use malloc?
- Operator overloading in C
- How to perform the inverse of _mm256_movemask_epi8 (VPMOVMSKB)?
- printf not printing on console
- How do I fix “for loop initial declaration used outside C99 mode” GCC error?
- Why is return 0 optional?
- How to call execl() in C with the proper arguments?
- What is the valid range for program return value in Linux/bash? [duplicate]
- Output of multiple post and pre increments in one statement [duplicate]
- how could I intercept linux sys calls?
- Pascal’s Triangle in C
- Detecting strtol failure [duplicate]
- Are “malloc(sizeof(struct a *))” and “malloc(sizeof(struct a))” the same?
- What is double star (eg. NSError **)?
- Find the Size of integer array received as an argument to a function in c [duplicate]
- How does srand relate to rand function?
- Why use the Bitwise-Shift operator for values in a C enum definition?
- What’s the difference between “int” and “int_fast16_t”?
- Is there any option to switch between C99 and C11 C standards in Visual Studio?
- How to read terminal’s input buffer immediately after keypress