Free Hero Mesh

Diff
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Differences From Artifact [e7202bf383]:

To Artifact [941e9e54d5]:


773
774
775
776
777
778
779

780
781
782
783
784
785
786
787
788
789
790
791
792
    return;
  }
  encode_move_list(fp);
  pclose(fp);
}

static void do_load_moves(sqlite3_stmt*st) {

  int i=sqlite3_column_bytes(st,1);
  if(i&~0xFFFF) return;
  if(replay_size<i) replay_list=realloc(replay_list,replay_size=i);
  if(!replay_list) fatal("Allocation failed");
  replay_count=i;
  if(i) memcpy(replay_list,sqlite3_column_blob(st,1),i);
}

static int copy_text_to_plain(unsigned char*out,int maxlen,const unsigned char*in) {
  int at=0;
  if(!in) {
    *out=0;
    return 0;







>

<
|
|
|
|







773
774
775
776
777
778
779
780
781

782
783
784
785
786
787
788
789
790
791
792
    return;
  }
  encode_move_list(fp);
  pclose(fp);
}

static void do_load_moves(sqlite3_stmt*st) {
  FILE*fp;
  int i=sqlite3_column_bytes(st,1);

  fp=fmemopen((char*)sqlite3_column_blob(st,1)?:"",i,"r");
  if(!fp) fatal("Allocation failed\n");
  decode_move_list(fp);
  fclose(fp);
}

static int copy_text_to_plain(unsigned char*out,int maxlen,const unsigned char*in) {
  int at=0;
  if(!in) {
    *out=0;
    return 0;