diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2013-05-01 01:00:38 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2013-05-01 01:00:38 -0400 |
commit | 81905f18dc0594e372cf38cfb0e0b71b69849a43 (patch) | |
tree | 8eb23ef6f907e1a4f53bd7c2247522b077037e63 /src/LYUtils.c | |
parent | 7827f0bdba0c75376e59443975f3638df4cce044 (diff) | |
download | lynx-snapshots-81905f18dc0594e372cf38cfb0e0b71b69849a43.tar.gz |
snapshot of project "lynx", label v2-8-8dev-15b
Diffstat (limited to 'src/LYUtils.c')
-rw-r--r-- | src/LYUtils.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/LYUtils.c b/src/LYUtils.c index a82e30c2..19bf4b67 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYUtils.c,v 1.227 2012/08/15 23:11:03 tom Exp $ + * $LynxId: LYUtils.c,v 1.230 2013/04/30 23:56:38 tom Exp $ */ #include <HTUtils.h> #include <HTTCP.h> @@ -546,7 +546,8 @@ static BOOL show_whereis_targets(int flag, * characters of the hightext if we're making the link current. * -FM */ - if ((Offset < offset) && + if (offset >= 0 && + (Offset < offset) && ((Offset + tLen) > offset)) { itmp = 0; written = 0; @@ -2930,10 +2931,6 @@ void LYExtSignal(int sig, act.sa_handler = handler; sigemptyset(&act.sa_mask); act.sa_flags = 0; -#ifdef SA_RESTART - if (sig != SIGWINCH) - act.sa_flags |= SA_RESTART; -#endif /* SA_RESTART */ sigaction(sig, &act, NULL); } else #endif /* defined(SIGWINCH) */ @@ -3188,9 +3185,10 @@ void change_sug_filename(char *fname) HTSprintf0(&temp, "file://localhost/%s" PID_FMT, cp2, GETPID()); } if (!StrNCmp(fname, temp, strlen(temp))) { - cp = strrchr(fname, '.'); - if (strlen(cp) > (strlen(temp) - 4)) - cp = NULL; + if ((cp = strrchr(fname, '.')) != 0) { + if (strlen(cp) > (strlen(temp) - 4)) + cp = NULL; + } StrAllocCopy(temp, NonNull(cp)); sprintf(fname, "temp%.*s", LY_MAXPATH - 10, temp); } |