summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-12-20 12:31:42 +0100
committerAlexis211 <alexis211@gmail.com>2009-12-20 12:31:42 +0100
commita804601188be682ce87e6a9591286e8c8ab2817d (patch)
treeb1ce5647b5bf85979d9a98fa5d3cea752ae9a463 /Source
parent6f4489484ad51e00f7d9246309c750955a3a2baf (diff)
parent07f030f2a2147598236c5fd361a7caaba7d00b23 (diff)
downloadMelon-a804601188be682ce87e6a9591286e8c8ab2817d.tar.gz
Melon-a804601188be682ce87e6a9591286e8c8ab2817d.zip
Merge branch 'master' into framework
Diffstat (limited to 'Source')
-rw-r--r--Source/Kernel/Devices/Display/VESADisplay.class.cpp3
-rw-r--r--Source/Kernel/FileSystems/FAT/FATFS.class.cpp8
2 files changed, 7 insertions, 4 deletions
diff --git a/Source/Kernel/Devices/Display/VESADisplay.class.cpp b/Source/Kernel/Devices/Display/VESADisplay.class.cpp
index d4aee07..7c4adca 100644
--- a/Source/Kernel/Devices/Display/VESADisplay.class.cpp
+++ b/Source/Kernel/Devices/Display/VESADisplay.class.cpp
@@ -208,7 +208,7 @@ void VESADisplay::putPix(u16int x, u16int y, u32int c) {
u32int VESADisplay::getPix(u16int x, u16int y) {
if (x >= m_currMode.Xres or y >= m_currMode.Yres) return 0;
- u32int ret;
+ u32int ret = 0;
union {
u8int* c;
u16int* w;
@@ -258,6 +258,7 @@ void VESADisplay::drawChar(u16int line, u16int col, WChar c, u8int color) {
p[2] = (bgcolor);
p += 3;
}
+ p -= (9 * 3);
}
p += m_currMode.pitch;
}
diff --git a/Source/Kernel/FileSystems/FAT/FATFS.class.cpp b/Source/Kernel/FileSystems/FAT/FATFS.class.cpp
index 4c20b3f..f1d01c5 100644
--- a/Source/Kernel/FileSystems/FAT/FATFS.class.cpp
+++ b/Source/Kernel/FileSystems/FAT/FATFS.class.cpp
@@ -70,7 +70,7 @@ u32int FATFS::nextCluster(u32int cluster) {
u32int fat_sector = m_bs.reserved_sector_count + (fat_offset / m_part->blockSize());
u32int ent_offset = fat_offset % m_part->blockSize();
m_fatCache.readBlocks(fat_sector, 1, fat_table);
- u16int tblval = *(u16int*)&fat_table[ent_offset];
+ u16int tblval = *((u16int*)(fat_table + ent_offset));
if (cluster & 1) val = tblval >> 4;
else val = tblval & 0x0FFF;
if (val >= 0xFF7) val = 0;
@@ -79,7 +79,7 @@ u32int FATFS::nextCluster(u32int cluster) {
u32int fat_sector = m_bs.reserved_sector_count + (fat_offset / m_part->blockSize());
u32int ent_offset = fat_offset % m_part->blockSize();
m_fatCache.readBlocks(fat_sector, 1, fat_table);
- u16int tblval = *(u16int*)&fat_table[ent_offset];
+ u16int tblval = *(u16int*)(fat_table + ent_offset);
val = tblval;
if (tblval >= 0xFFF7) val = 0;
} else if (m_fatType == 32) {
@@ -87,8 +87,10 @@ u32int FATFS::nextCluster(u32int cluster) {
u32int fat_sector = m_bs.reserved_sector_count + (fat_offset / m_part->blockSize());
u32int ent_offset = fat_offset % m_part->blockSize();
m_fatCache.readBlocks(fat_sector, 1, fat_table);
- val = *(u32int*)&fat_table[ent_offset] & 0x0FFFFFFF;
+ val = *(u32int*)(fat_table + ent_offset) & 0x0FFFFFFF;
if (val >= 0x0FFFFFF7) val = 0;
+ } else {
+ val = 0;
}
return val;
}