Skip to content
Snippets Groups Projects
Commit a76da51b authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Resolve MSVC warnings

parent 70e60248
No related branches found
No related tags found
No related merge requests found
Pipeline #7774 passed
...@@ -342,7 +342,7 @@ static struct vstat_vmem *new_vmem(int cols, int rows, bool palette) ...@@ -342,7 +342,7 @@ static struct vstat_vmem *new_vmem(int cols, int rows, bool palette)
struct vmem_cell * struct vmem_cell *
vmem_cell_ptr(struct vstat_vmem *vm, int x, int y) vmem_cell_ptr(struct vstat_vmem *vm, int x, int y)
{ {
int off = y * vm->width + x; size_t off = y * vm->width + x;
off += vm->top_row * vm->width; off += vm->top_row * vm->width;
if (off >= vm->count) if (off >= vm->count)
off -= vm->count; off -= vm->count;
...@@ -352,7 +352,7 @@ vmem_cell_ptr(struct vstat_vmem *vm, int x, int y) ...@@ -352,7 +352,7 @@ vmem_cell_ptr(struct vstat_vmem *vm, int x, int y)
int int
vmem_cell_offset(struct vstat_vmem *vm, int x, int y) vmem_cell_offset(struct vstat_vmem *vm, int x, int y)
{ {
int off = y * vm->width + x; size_t off = y * vm->width + x;
off += vm->top_row * vm->width; off += vm->top_row * vm->width;
if (off >= vm->count) if (off >= vm->count)
off -= vm->count; off -= vm->count;
...@@ -397,7 +397,7 @@ int ...@@ -397,7 +397,7 @@ int
vmem_next_row_offset(struct vstat_vmem *vm, int off) vmem_next_row_offset(struct vstat_vmem *vm, int off)
{ {
off += vm->width; off += vm->width;
if (off >= vm->count) if ((size_t)off >= vm->count)
off -= vm->count; off -= vm->count;
return off; return off;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment