diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/libuemf/upmf.c | 6 | ||||
| -rw-r--r-- | src/libuemf/uwmf_endian.c | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/libuemf/upmf.c b/src/libuemf/upmf.c index 2ba818fa4..fe929e443 100644 --- a/src/libuemf/upmf.c +++ b/src/libuemf/upmf.c @@ -21,8 +21,8 @@ /* File: upmf.c -Version: 0.0.10 -Date: 27-APR-2015 +Version: 0.0.11 +Date: 28-MAY-2015 Author: David Mathog, Biology Division, Caltech email: mathog@caltech.edu Copyright: 2015 David Mathog and California Institute of Technology (Caltech) @@ -3077,7 +3077,7 @@ U_PSEUDO_OBJ *U_PMF_POINTR_set(uint32_t Elements, const U_PMF_POINTF *Coords){ poi = U_PMF_4NUM_set(Elements); po = U_PO_append(po, poi->Data, poi->Used); U_PO_free(&poi); - if(po)goto end; + if(!po)goto end; for(Xf = Yf = 0.0 ;Elements; Elements--, Coords++){ Xf = U_ROUND(Coords->X) - Xf; diff --git a/src/libuemf/uwmf_endian.c b/src/libuemf/uwmf_endian.c index de0b3ef87..7a047c2a5 100644 --- a/src/libuemf/uwmf_endian.c +++ b/src/libuemf/uwmf_endian.c @@ -6,8 +6,8 @@ /* File: uwmf_endian.c -Version: 0.1.4 -Date: 28-APR-2015 +Version: 0.1.5 +Date: 28-MAY-2015 Author: David Mathog, Biology Division, Caltech email: mathog@caltech.edu Copyright: 2015 David Mathog and California Institute of Technology (Caltech) @@ -1480,7 +1480,8 @@ int U_wmf_endian(char *contents, size_t length, int torev, int onerec){ uint32_t OK, Size16; uint8_t iType; char *record; - int recnum, offset; + int recnum; + int offset=0; record = contents; if(!onerec){ @@ -1759,10 +1760,10 @@ int U_wmf_endian(char *contents, size_t length, int torev, int onerec){ case U_WMR_CREATEREGION: U_WMRCREATEREGION_swap(record, torev); break; default: U_WMRNOTIMPLEMENTED_swap(record, torev); break; } //end of switch + if(onerec)break; record += 2*Size16; offset += 2*Size16; recnum++; - if(onerec)break; } //end of while return(1); } |
