summaryrefslogtreecommitdiffstats
path: root/generic/tclZlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclZlib.c')
-rw-r--r--generic/tclZlib.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index ce8da3c..cd3b3c5 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -449,12 +449,16 @@ GenerateHeader(
headerPtr->nativeCommentBuf, MAX_COMMENT_LEN-1, NULL, &len,
NULL);
if (result != TCL_OK) {
- if (result == TCL_CONVERT_UNKNOWN) {
- Tcl_AppendResult(interp, "Comment contains characters > 0xFF", NULL);
- } else {
- Tcl_AppendResult(interp, "Comment too large for zip", NULL);
+ if (interp) {
+ if (result == TCL_CONVERT_UNKNOWN) {
+ Tcl_AppendResult(
+ interp, "Comment contains characters > 0xFF", NULL);
+ }
+ else {
+ Tcl_AppendResult(interp, "Comment too large for zip", NULL);
+ }
}
- result = TCL_ERROR;
+ result = TCL_ERROR; /* TCL_CONVERT_* -> TCL_ERROR*/
goto error;
}
headerPtr->nativeCommentBuf[len] = '\0';
@@ -481,12 +485,17 @@ GenerateHeader(
headerPtr->nativeFilenameBuf, MAXPATHLEN-1, NULL, &len,
NULL);
if (result != TCL_OK) {
- if (result == TCL_CONVERT_UNKNOWN) {
- Tcl_AppendResult(interp, "Filename contains characters > 0xFF", NULL);
- } else {
- Tcl_AppendResult(interp, "Filename too large for zip", NULL);
+ if (interp) {
+ if (result == TCL_CONVERT_UNKNOWN) {
+ Tcl_AppendResult(
+ interp, "Filename contains characters > 0xFF", NULL);
+ }
+ else {
+ Tcl_AppendResult(
+ interp, "Filename too large for zip", NULL);
+ }
}
- result = TCL_ERROR;
+ result = TCL_ERROR; /* TCL_CONVERT_* -> TCL_ERROR*/
goto error;
}
headerPtr->nativeFilenameBuf[len] = '\0';