aboutsummaryrefslogtreecommitdiffstats
path: root/core/bios.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-01-10 11:22:56 +0000
committerMatt Fleming <matt.fleming@intel.com>2013-01-11 09:28:38 +0000
commitafd985f6eec18a0f66a8fc55f9c5e3431128310f (patch)
treeb4e657eccfd9a6f993286f49bc2b6951ef68eb56 /core/bios.c
parente394bc5e14d6e0d588178bf4a78f942acd423135 (diff)
downloadsyslinux-afd985f6eec18a0f66a8fc55f9c5e3431128310f.tar.gz
syslinux-afd985f6eec18a0f66a8fc55f9c5e3431128310f.tar.xz
syslinux-afd985f6eec18a0f66a8fc55f9c5e3431128310f.zip
Revert "vesa: Correct screencpy() prototype"
This reverts commit 15a67011987c341814533ac4d8e23c9a72dc7605, because as Peter points out, The objects are uint32_t and so the prototype is correct. It should not "leak" outside the screencpy function that we play ugly tricks with these pointers; that is better handled by an internal cast. So do the necessary casting inside bios_vesacon_screencpy(). Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'core/bios.c')
-rw-r--r--core/bios.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/bios.c b/core/bios.c
index d0ceffc7..1becd280 100644
--- a/core/bios.c
+++ b/core/bios.c
@@ -414,13 +414,14 @@ static void set_window_pos(struct win_info *wi, size_t win_pos)
__intcall(0x10, &ireg, NULL);
}
-static void bios_vesacon_screencpy(size_t dst, const char * src,
+static void bios_vesacon_screencpy(size_t dst, const uint32_t * src,
size_t bytes, struct win_info *wi)
{
size_t win_pos, win_off;
size_t win_size = wi->win_size;
size_t omask = win_size - 1;
char *win_base = wi->win_base;
+ const char *s = (const char *)src;
size_t l;
while (bytes) {
@@ -431,10 +432,10 @@ static void bios_vesacon_screencpy(size_t dst, const char * src,
set_window_pos(wi, win_pos);
l = min(bytes, win_size - win_off);
- memcpy(win_base + win_off, src, l);
+ memcpy(win_base + win_off, s, l);
bytes -= l;
- src += l;
+ s += l;
dst += l;
}
}