voltara / fluffos Goto Github PK
View Code? Open in Web Editor NEWThis project forked from quixadhal/fluffos
The FluffOS LpMUD driver (descendant of MudOS)
License: Other
This project forked from quixadhal/fluffos
The FluffOS LpMUD driver (descendant of MudOS)
License: Other
/* find and return a user command */
for (i = 0; i < max_users; i++) {
ip = all_users[NextCmdGiver++];
NextCmdGiver %= max_users;
/* ... */
/* if there's a command in the buffer, pull it out! */
if (ip->iflags & CMD_IN_BUF) {
NextCmdGiver++;
NextCmdGiver %= max_users;
user_command = first_cmd_in_buf(ip);
break;
}
It is not necessary to increment NextCmdGiver a second time; this allows one user to starve another of command processing time.
When applying init() over the destination's inventory, the loop does not check whether a traversed object was moved away. This can result in setup_new_commands proceeding to apply init over the wrong object's inventory. Two problems here: (1) Part of the destination's inventory will not have init() run; (2) Another unrelated object's inventory WILL have init() run.
A fairly straightforward mitigation is to throw an error if (dest != ob->super) for a traversed object.
void evil()
{
call_out("evil", 0);
}
The above causes an infinite loop because each call_out apply to "evil" gets a new eval_cost budget.
Propose fixing by limiting eval_cost for new immediate call_outs added while processing call_outs.
Evaluation cost is tracked internally by a CPU clock alarm; the eval_cost efun returns an estimate based on elapsed wall time. This can even return negative numbers to the caller. Proposed fix is to add an optional POSIX timers based eval_cost mechanism, and to use timer_gettime() when querying the amount remaining.
setitimer/getitimer is not as suitable because getitimer only has 1/250 second resolution on current versions of Linux, which limits precision when profiling LPC code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.