mirror of
https://github.com/open-goal/jak-project
synced 2026-08-08 18:44:15 -04:00
implement some loads and stores
This commit is contained in:
@@ -199,6 +199,7 @@ char* basename_goal(char* s) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Original code, has memory bug.
|
||||
// back up...
|
||||
for (;;) {
|
||||
if (pt < input) {
|
||||
@@ -211,6 +212,20 @@ char* basename_goal(char* s) {
|
||||
return pt + 1; // and return one past
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// back up...
|
||||
for (;;) {
|
||||
if (pt <= input) {
|
||||
return input;
|
||||
}
|
||||
pt--;
|
||||
char c = *pt;
|
||||
// until we hit a slash.
|
||||
if (c == '\\' || c == '/') { // slashes
|
||||
return pt + 1; // and return one past
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user