diff options
| author | arg@mig29 <unknown> | 2006-11-26 14:26:53 +0100 |
|---|---|---|
| committer | arg@mig29 <unknown> | 2006-11-26 14:26:53 +0100 |
| commit | 61a1910f91fe6aba428193087d6c3ff21374ee5e (patch) | |
| tree | c6406dfd44df07e2e54309f29aef093b798d3d2d /draw.c | |
| parent | applied Jukka's stdinread patch (diff) | |
| download | dwm-61a1910f91fe6aba428193087d6c3ff21374ee5e.tar.gz dwm-61a1910f91fe6aba428193087d6c3ff21374ee5e.zip | |
applied Jukka's sizeof K&R compliance patch, applied Manuels' last-line printage proposal for stdin reading.
Diffstat (limited to '')
| -rw-r--r-- | draw.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -43,8 +43,8 @@ drawtext(const char *text, unsigned long col[ColLast], Bool ldot, Bool rdot) { | |||
| 43 | return; | 43 | return; |
| 44 | w = 0; | 44 | w = 0; |
| 45 | olen = len = strlen(text); | 45 | olen = len = strlen(text); |
| 46 | if(len >= sizeof(buf)) | 46 | if(len >= sizeof buf) |
| 47 | len = sizeof(buf) - 1; | 47 | len = sizeof buf - 1; |
| 48 | memcpy(buf, text, len); | 48 | memcpy(buf, text, len); |
| 49 | buf[len] = 0; | 49 | buf[len] = 0; |
| 50 | h = dc.font.ascent + dc.font.descent; | 50 | h = dc.font.ascent + dc.font.descent; |
