aboutsummaryrefslogtreecommitdiffstats
path: root/toj/center/src/judge.h
diff options
context:
space:
mode:
Diffstat (limited to 'toj/center/src/judge.h')
-rw-r--r--toj/center/src/judge.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/toj/center/src/judge.h b/toj/center/src/judge.h
index 5183942..1b5a885 100644
--- a/toj/center/src/judge.h
+++ b/toj/center/src/judge.h
@@ -32,12 +32,18 @@ public:
judge_pro_info *pro_info;
int lang;
char *set_data;
+ int set_len;
- judge_submit_info(int subid,judge_pro_info *pro_info,int lang,char *set_data){
+ judge_submit_info(int subid,judge_pro_info *pro_info,int lang,char *set_data,int set_len){
this->subid = subid;
this->pro_info = pro_info;
this->lang = lang;
- this->set_data = set_data;
+ this->set_data = new char[set_len];
+ memcpy(this->set_data,set_data,set_len);
+ this->set_len = set_len;
+ }
+ ~judge_submit_info(){
+ delete this->set_data;
}
};