diff options
| author | Richard M. Stallman | 1993-11-10 08:29:34 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-11-10 08:29:34 +0000 |
| commit | c52419107a8e1e97505b2460fbb61a09a0fd086b (patch) | |
| tree | 5e059f7a1caa9c359dd5e7bcedfc0fd8524e9cf7 /src | |
| parent | c975dd7a6574bb95aabc88977a6dbb7155e1df8b (diff) | |
| download | emacs-c52419107a8e1e97505b2460fbb61a09a0fd086b.tar.gz emacs-c52419107a8e1e97505b2460fbb61a09a0fd086b.zip | |
(skip_chars): Finish reenabling checks for buffer bounds.
Use XINT, not XFASTINT, when testing.
Diffstat (limited to 'src')
| -rw-r--r-- | src/search.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/search.c b/src/search.c index 8a821837528..a1dc6769d6f 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -417,19 +417,13 @@ skip_chars (forwardp, syntaxp, string, lim) | |||
| 417 | CHECK_NUMBER_COERCE_MARKER (lim, 1); | 417 | CHECK_NUMBER_COERCE_MARKER (lim, 1); |
| 418 | 418 | ||
| 419 | /* In any case, don't allow scan outside bounds of buffer. */ | 419 | /* In any case, don't allow scan outside bounds of buffer. */ |
| 420 | 420 | /* jla turned this off, for no known reason. | |
| 421 | /* I don't know what things this breaks, and there is no entry in the | 421 | bfox turned the ZV part on, and rms turned the |
| 422 | ChangeLog, so I reinstated the end of buffer limit check. This code | 422 | BEGV part back on. */ |
| 423 | breaks without it. (bfox) */ | 423 | if (XINT (lim) > ZV) |
| 424 | /* #if 0 /* This breaks some things... jla. */ | ||
| 425 | #if 1 | ||
| 426 | if (XFASTINT (lim) > ZV) | ||
| 427 | XFASTINT (lim) = ZV; | 424 | XFASTINT (lim) = ZV; |
| 428 | #endif | 425 | if (XINT (lim) < BEGV) |
| 429 | #if 0 | ||
| 430 | if (XFASTINT (lim) < BEGV) | ||
| 431 | XFASTINT (lim) = BEGV; | 426 | XFASTINT (lim) = BEGV; |
| 432 | #endif | ||
| 433 | 427 | ||
| 434 | p = XSTRING (string)->data; | 428 | p = XSTRING (string)->data; |
| 435 | pend = p + XSTRING (string)->size; | 429 | pend = p + XSTRING (string)->size; |