Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
b3cee192
There was an error fetching the commit references. Please try again later.
Commit
b3cee192
authored
10 years ago
by
Subv
Browse files
Options
Downloads
Patches
Plain Diff
CFG: Changed the CreateConfigInfoBlk search loop
parent
3e94b905
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/hle/service/cfg/cfg.cpp
+4
-7
4 additions, 7 deletions
src/core/hle/service/cfg/cfg.cpp
with
4 additions
and
7 deletions
src/core/hle/service/cfg/cfg.cpp
+
4
−
7
View file @
b3cee192
...
...
@@ -69,19 +69,16 @@ ResultCode CreateConfigInfoBlk(u32 block_id, u32 size, u32 flags, const u8* data
// Insert the block header with offset 0 for now
config
->
block_entries
[
config
->
total_entries
]
=
{
block_id
,
0
,
size
,
flags
};
if
(
size
>
4
)
{
s32
total_entries
=
config
->
total_entries
-
1
;
u32
offset
=
config
->
data_entries_offset
;
// Perform a search to locate the next offset for the new data
// use the offset and size of the previous block to determine the new position
while
(
total_entries
>=
0
)
{
for
(
int
i
=
config
->
total_entries
-
1
;
i
>=
0
;
--
i
)
{
// Ignore the blocks that don't have a separate data offset
if
(
config
->
block_entries
[
total_entries
].
size
>
4
)
{
offset
=
config
->
block_entries
[
total_entries
].
offset_or_data
+
config
->
block_entries
[
total_entries
].
size
;
if
(
config
->
block_entries
[
i
].
size
>
4
)
{
offset
=
config
->
block_entries
[
i
].
offset_or_data
+
config
->
block_entries
[
i
].
size
;
break
;
}
--
total_entries
;
}
config
->
block_entries
[
config
->
total_entries
].
offset_or_data
=
offset
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment