Ignore:
Timestamp:
12/01/10 20:05:53 (10 years ago)
Author:
alno
Message:

WebIf: fix malformed CSS on external skins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/oscam-http-helpers.c

    r3937 r4027  
    433433        FILE *fp;
    434434        char buffer[1024];
    435         int read;
     435        memset(buffer, 0, 1024);
    436436
    437437        if((fp = fopen(cfg->http_css,"r"))==NULL) return;
    438         while((read = fread(buffer,sizeof(char),1024,fp)) > 0) webif_write(buffer, f);
     438        while(fgets(buffer, 1024, fp) != 0) {
     439            webif_write(buffer, f);
     440            memset(buffer, 0, 1024);
     441        }
    439442        fclose (fp);
    440443    } else {
     
    447450        FILE *fp;
    448451        char buffer[1024];
    449         int read;
     452        memset(buffer, 0, 1024);
    450453
    451454        if((fp = fopen(cfg->http_jscript,"r"))==NULL) return;
    452         while((read = fread(buffer,sizeof(char),1024,fp)) > 0) webif_write(buffer, f);
     455        while(fgets(buffer, 1024, fp) != 0) {
     456            webif_write(buffer, f);
     457            memset(buffer, 0, 1024);
     458        }
    453459        fclose (fp);
    454460    } else {
Note: See TracChangeset for help on using the changeset viewer.