Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SSNTails
SRB2
Commits
2eedecb9
Commit
2eedecb9
authored
9 years ago
by
Monster Iestyn
Browse files
Options
Downloads
Patches
Plain Diff
Get rid of unneeded tab spaces
Least I can do to make up for breaking io.open in the first place :E
parent
9c299e5a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/blua/liolib.c
+6
-6
6 additions, 6 deletions
src/blua/liolib.c
with
6 additions
and
6 deletions
src/blua/liolib.c
+
6
−
6
View file @
2eedecb9
...
@@ -174,7 +174,7 @@ static int io_open (lua_State *L) {
...
@@ -174,7 +174,7 @@ static int io_open (lua_State *L) {
char
*
splitter
,
*
forward
,
*
backward
;
char
*
splitter
,
*
forward
,
*
backward
;
char
*
destFilename
;
char
*
destFilename
;
const
char
*
mode
=
luaL_optstring
(
L
,
2
,
"r"
);
const
char
*
mode
=
luaL_optstring
(
L
,
2
,
"r"
);
for
(
i
=
0
;
i
<
(
sizeof
(
whitelist
)
/
sizeof
(
const
char
*
));
i
++
)
for
(
i
=
0
;
i
<
(
sizeof
(
whitelist
)
/
sizeof
(
const
char
*
));
i
++
)
{
{
if
(
!
stricmp
(
&
filename
[
length
-
strlen
(
whitelist
[
i
])],
whitelist
[
i
]))
if
(
!
stricmp
(
&
filename
[
length
-
strlen
(
whitelist
[
i
])],
whitelist
[
i
]))
...
@@ -189,12 +189,12 @@ static int io_open (lua_State *L) {
...
@@ -189,12 +189,12 @@ static int io_open (lua_State *L) {
luaL_error
(
L
,
"access denied to %s"
,
filename
);
luaL_error
(
L
,
"access denied to %s"
,
filename
);
return
pushresult
(
L
,
0
,
filename
);
return
pushresult
(
L
,
0
,
filename
);
}
}
destFilename
=
va
(
"luafiles"
PATHSEP
"%s"
,
filename
);
destFilename
=
va
(
"luafiles"
PATHSEP
"%s"
,
filename
);
// Make directories as needed
// Make directories as needed
splitter
=
destFilename
;
splitter
=
destFilename
;
forward
=
strchr
(
splitter
,
'/'
);
forward
=
strchr
(
splitter
,
'/'
);
backward
=
strchr
(
splitter
,
'\\'
);
backward
=
strchr
(
splitter
,
'\\'
);
while
((
splitter
=
(
forward
&&
backward
)
?
min
(
forward
,
backward
)
:
(
forward
?:
backward
)))
while
((
splitter
=
(
forward
&&
backward
)
?
min
(
forward
,
backward
)
:
(
forward
?:
backward
)))
...
@@ -203,11 +203,11 @@ static int io_open (lua_State *L) {
...
@@ -203,11 +203,11 @@ static int io_open (lua_State *L) {
I_mkdir
(
destFilename
,
0755
);
I_mkdir
(
destFilename
,
0755
);
*
splitter
=
'/'
;
*
splitter
=
'/'
;
splitter
++
;
splitter
++
;
forward
=
strchr
(
splitter
,
'/'
);
forward
=
strchr
(
splitter
,
'/'
);
backward
=
strchr
(
splitter
,
'\\'
);
backward
=
strchr
(
splitter
,
'\\'
);
}
}
pf
=
newfile
(
L
);
pf
=
newfile
(
L
);
*
pf
=
fopen
(
destFilename
,
mode
);
*
pf
=
fopen
(
destFilename
,
mode
);
return
(
*
pf
==
NULL
)
?
pushresult
(
L
,
0
,
filename
)
:
1
;
return
(
*
pf
==
NULL
)
?
pushresult
(
L
,
0
,
filename
)
:
1
;
...
...
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