Properly set environment pointer.
This commit is contained in:
parent
f4e3196494
commit
9231075799
@ -13,7 +13,8 @@ libmain(int argc, char **argv)
|
||||
{
|
||||
// set thisenv to point at our Env structure in envs[].
|
||||
// LAB 3: Your code here.
|
||||
thisenv = 0;
|
||||
envid_t id = sys_getenvid();
|
||||
thisenv = &envs[ENVX(id)];
|
||||
|
||||
// save the name of the program so that panic() can use it
|
||||
if (argc > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user