mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-18 17:25:09 -04:00
Correct some memory leaks found by MSVC
This commit is contained in:
parent
6c631bf282
commit
18b986156f
10 changed files with 60 additions and 35 deletions
|
@ -92,7 +92,7 @@ int is_sane(char test_string[], unsigned char source[])
|
|||
{ /* Verifies that a string only uses valid characters */
|
||||
unsigned int i, j, latch;
|
||||
|
||||
for(i = 0; i < ustrlen(source); i++) {
|
||||
for(i = 0; i < ustrlen(source) - 1; i++) {
|
||||
latch = FALSE;
|
||||
for(j = 0; j < strlen(test_string); j++) {
|
||||
if (source[i] == test_string[j]) { latch = TRUE; } }
|
||||
|
@ -231,6 +231,19 @@ int is_stackable(int symbology) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int is_extendable(int symbology) {
|
||||
/* Indicates which symbols can have addon */
|
||||
if(symbology == BARCODE_EANX) { return 1; }
|
||||
if(symbology == BARCODE_UPCA) { return 1; }
|
||||
if(symbology == BARCODE_UPCE) { return 1; }
|
||||
if(symbology == BARCODE_ISBNX) { return 1; }
|
||||
if(symbology == BARCODE_UPCA_CC) { return 1; }
|
||||
if(symbology == BARCODE_UPCE_CC) { return 1; }
|
||||
if(symbology == BARCODE_EANX_CC) { return 1; }
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int roundup(float input)
|
||||
{
|
||||
float remainder;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue