Skip to content

x < height 是否應該改為 x < width ? #6

Closed
@ccckmit

Description

@ccckmit

在 syscall_sdl.c 當中的下列這段程式,x < height 是否應該改為 x < width ?

     for (size_t y = 0; y < height; ++y) {
        for (size_t x = 0; x < height; ++x) {
            const uint8_t c = p[x];
            const uint8_t *lut = j + (c * 3);
            d[x] = (lut[0] << 16) | (lut[1] << 8) | lut[2];
        }
        p += width, d += width;
    }

修改為

     for (size_t y = 0; y < height; ++y) {
        for (size_t x = 0; x < width; ++x) {
            const uint8_t c = p[x];
            const uint8_t *lut = j + (c * 3);
            d[x] = (lut[0] << 16) | (lut[1] << 8) | lut[2];
        }
        p += width, d += width;
    }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions