aboutsummaryrefslogtreecommitdiffstats
path: root/src/insdel.c
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1994-10-25 07:53:05 +0000
committerRichard M. Stallman <[email protected]>1994-10-25 07:53:05 +0000
commit61bd0e9ccd7510ec0dc5641347caaf0c7714483e (patch)
tree82028b1c60b30aa379d199d73028298397455957 /src/insdel.c
parente8649704b1f022d24b838a61190dfbf5da8c8007 (diff)
(insert_from_buffer_1): Don't use min.
Diffstat (limited to 'src/insdel.c')
-rw-r--r--src/insdel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/insdel.c b/src/insdel.c
index 7b1e6b124b..47e7529800 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -485,7 +485,9 @@ insert_from_buffer_1 (buf, pos, length, inherit)
if (pos < BUF_GPT (buf))
{
- chunk = min (length, BUF_GPT (buf) - pos);
+ chunk = BUF_GPT (buf) - pos;
+ if (chunk > length)
+ chunk = length;
bcopy (BUF_CHAR_ADDRESS (buf, pos), GPT_ADDR, chunk);
}
else