- fix with deck names overwritten when saving
- Added "premade" decks directory for people who don't want to create their own decks
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-07-18 05:42:20 +00:00
parent 241d53edd2
commit 4606d88048
4 changed files with 51 additions and 4 deletions
+15
View File
@@ -507,6 +507,21 @@ int MTGDeck::save(){
#if defined (WIN32) || defined (LINUX)
OutputDebugString("saving");
#endif
if (meta_name.size()){
file << "#NAME:" << meta_name << '\n';
}
if (meta_desc.size()){
size_t found = 0;
string desc= meta_desc;
found = desc.find_first_of("\n");
while(found != string::npos){
file << "#DESC:" << desc.substr(0,found+1);
desc=desc.substr(found+1);
found = desc.find_first_of("\n");
}
file << "#DESC:" << desc << "\n";
}
map<int,int>::iterator it;
for (it = cards.begin(); it!=cards.end(); it++){
sprintf(writer,"%i\n", it->first);