Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f85218

Browse files
committed
Endian swap bug fix.
1 parentc296690 commit7f85218

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

‎CDRM/File.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ short ReadShort(std::ifstream& ifs)
4343
short val;
4444
ifs.read((char*)&val,sizeof(short));
4545
#if ENDIAN_BIG
46-
ReverseShort(val);
46+
val =ReverseShort(val);
4747
#endif
4848
return val;
4949
}
@@ -53,7 +53,7 @@ unsigned short ReadUShort(std::ifstream& ifs)
5353
unsignedshort val;
5454
ifs.read((char*)&val,sizeof(unsignedshort));
5555
#if ENDIAN_BIG
56-
ReverseUShort(val);
56+
val =ReverseUShort(val);
5757
#endif
5858
return val;
5959
}
@@ -63,7 +63,7 @@ int ReadInt(std::ifstream& ifs)
6363
int val;
6464
ifs.read((char*)&val,sizeof(int));
6565
#if ENDIAN_BIG
66-
ReverseInt(val);
66+
val =ReverseInt(val);
6767
#endif
6868
return val;
6969
}

‎DRM/File.cpp‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ short ReadShort(std::ifstream& ifs)
5959
short val;
6060
ifs.read((char*)&val,sizeof(short));
6161
#if ENDIAN_BIG
62-
ReverseShort(val);
62+
val =ReverseShort(val);
6363
#endif
6464
return val;
6565
}
@@ -69,7 +69,7 @@ unsigned short ReadUShort(std::ifstream& ifs)
6969
unsignedshort val;
7070
ifs.read((char*)&val,sizeof(unsignedshort));
7171
#if ENDIAN_BIG
72-
ReverseUShort(val);
72+
val =ReverseUShort(val);
7373
#endif
7474
return val;
7575
}
@@ -79,7 +79,7 @@ int ReadInt(std::ifstream& ifs)
7979
int val;
8080
ifs.read((char*)&val,sizeof(int));
8181
#if ENDIAN_BIG
82-
ReverseInt(val);
82+
val =ReverseInt(val);
8383
#endif
8484
return val;
8585
}
@@ -89,7 +89,7 @@ unsigned int ReadUInt(std::ifstream& ifs)
8989
unsignedint val;
9090
ifs.read((char*)&val,sizeof(unsignedint));
9191
#if ENDIAN_BIG
92-
ReverseUInt(val);
92+
val =ReverseUInt(val);
9393
#endif
9494
return val;
9595
}
@@ -110,7 +110,7 @@ void WriteShort(std::ofstream& ofs, short input)
110110
{
111111
short val = input;
112112
#if ENDIAN_BIG
113-
ReverseShort(val);
113+
val =ReverseShort(val);
114114
#endif
115115
ofs.write((char*)&val,sizeof(short));
116116
}
@@ -119,7 +119,7 @@ void WriteUShort(std::ofstream& ofs, unsigned short input)
119119
{
120120
unsignedshort val = input;
121121
#if ENDIAN_BIG
122-
ReverseUShort(val);
122+
val =ReverseUShort(val);
123123
#endif
124124
ofs.write((char*)&val,sizeof(unsignedshort));
125125
}
@@ -128,7 +128,7 @@ void WriteInt(std::ofstream& ofs, int input)
128128
{
129129
int val = input;
130130
#if ENDIAN_BIG
131-
ReverseInt(val);
131+
val =ReverseInt(val);
132132
#endif
133133
ofs.write((char*)&val,sizeof(int));
134134
}
@@ -137,7 +137,7 @@ void WriteUInt(std::ofstream& ofs, unsigned int input)
137137
{
138138
unsignedint val = input;
139139
#if ENDIAN_BIG
140-
ReverseUInt(val);
140+
val =ReverseUInt(val);
141141
#endif
142142
ofs.write((char*)&val,sizeof(unsignedint));
143143
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp